diff options
Diffstat (limited to 'gcc-4.8/gcc/testsuite/g++.old-deja/g++.bugs/900209_01.C')
-rw-r--r-- | gcc-4.8/gcc/testsuite/g++.old-deja/g++.bugs/900209_01.C | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc-4.8/gcc/testsuite/g++.old-deja/g++.bugs/900209_01.C b/gcc-4.8/gcc/testsuite/g++.old-deja/g++.bugs/900209_01.C new file mode 100644 index 000000000..6d91010ec --- /dev/null +++ b/gcc-4.8/gcc/testsuite/g++.old-deja/g++.bugs/900209_01.C @@ -0,0 +1,21 @@ +// { dg-do assemble } +// g++ 1.36.1 bug 900209_01 + +// g++ implicitly casts values whose types are "void*" to other pointer +// types (just as the language rules for C permit). Such implicit +// conversions are not allowed by the Cfront 2.0 Reference Manual +// however. + +// Cfront 2.0 passes this test. + +// keywords: void pointers, type conversions, pointer type conversions + +void * void_pointer_object; +char * char_pointer_object; + +void global_function_0 () +{ + char_pointer_object = void_pointer_object; // { dg-error "" } +} + +int main () { return 0; } |