FSF GCC merge 02/23/03
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.bugs / 900213_01.C
blob309a41943dab5d75d8802014a5de2c3be3041984
1 // g++ 1.36.1 bug 900213_01
3 // g++ incorrectly diagnoses the error when an attempt is made to reference
4 // a non-static data-member without an object indication.
6 // Similar attempts to reference non-static function-members are correctly
7 // diagnosed by g++.
9 // Cfront 2.0 passes this test.
11 // keywords: non-static members, member pointers, scope resolution
13 struct struct0 {
14   int struct0_data_member_0;            /* ERROR - gets error from below */
15   int struct0_function_member_0 ();
18 int i;
20 void global_function_0 ()
22   i = struct0::struct0_data_member_0;           /* ERROR - mishandled by g++ */
23   //i = struct0::struct0_function_member_0 ();  /* gets caught by g++ */
26 int main () { return 0; }