diff options
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.jason/typeck.C')
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.jason/typeck.C | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.jason/typeck.C b/gcc/testsuite/g++.old-deja/g++.jason/typeck.C new file mode 100644 index 00000000000..cffbc87bbce --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.jason/typeck.C @@ -0,0 +1,19 @@ +// Bug: g++ fails to catch incompatibilities in the parameter lists when +// assigning. +// Build don't link: + +typedef struct S *type_p; +typedef struct S const *ctype_p; + +typedef ctype_p (*PF) (int); + +type_p callee (type_p arg) { return 0; } + +void foobar () +{ + static PF p = callee; // ERROR - + + p = callee; // ERROR - +} + +PF pp = callee; // ERROR - |