3 // { dg-options -std=c++98 }
26 // no complaints about a missing semicolon
27 return __builtin_offsetof (struct OK4 { int a; int b; }, b);
33 } ok5_var; // no complaints
38 } static ok6_var; // no complaints
45 } const ok7_var; // no complaints
50 } extern ok8_var; // no complaints
54 class OK9sub { int a; } mutable ok9sub; // no complaints
61 struct OK10 { int a; } auto ok10 = { 0 }; // no complaints
76 const &ok12_var = *(new OK12());
111 } // { dg-error "after struct definition" }
118 } // { dg-error "after struct definition" }
125 } // { dg-error "after struct definition" }
127 volatile long l0 = 1;
132 } // { dg-error "after struct definition" }
139 } // { dg-error "after struct definition" }
146 } // { dg-error "after struct definition" }
153 } // { dg-error "after class definition" }
160 } // { dg-error "after class definition" }
170 } // { dg-error "after class definition" }
180 } // { dg-error "after class definition" }
182 extern class D0 &f0 (void);
187 } // { dg-error "after class definition" }
189 const struct E6 *f1 (void) { return 0; }
199 } // { dg-error "after class definition" }
201 const union U0 *f2 (void) { return 0; }
210 } // { dg-error "after class definition" }
212 static enum e f3 (void) { return U; }
218 } // { dg-error "after union definition" }
226 } // { dg-error "after union definition" }
232 class sub0 { int a; } // { dg-error "after class definition" }
233 virtual int f2 (void);
234 } // { dg-error "after class definition" }
238 class sub0 { int a; } // { dg-error "after class definition" }
240 } // { dg-error "after class definition" }
245 } // { dg-error "after class definition" }
249 /* This was the original test from the PR. */
255 } // { dg-error "after class definition" }
257 const int foo(const C0 &x)