FSF GCC merge 02/23/03
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.bugs / 900210_03.C
blob8711d868a06c93bc75c078ce6d0055d01d6c643f
1 // g++ 1.36.1 bug 900210_03
3 // g++ allows void* type values to be assigned to variables of other
4 // pointer types.  According to the C++ Reference Manual, this is illegal.
6 // Cfront 2.0 passes this test.
8 // keywords: void pointers, pointer type conversions, implicit type conversions
10 void* vp;
11 char* cp;
12 int* ip;
13 enum {enum_value_1} * ep;
14 struct { int member; } * sp;
15 void (*fp) (void);
17 void global_function ()
19   cp = vp;      /* ERROR -  */
20   ip = vp;      /* ERROR -  */
21   ep = vp;      /* ERROR -  */
22   sp = vp;      /* ERROR -  */
23   fp = vp;      /* ERROR -  */
26 int main () { return 0; }