blob: 2daa5fe3e45be8367c27c0d0a369536d33fb99c6 [file] [log] [blame]
// Test that g++ complains about referring to a builtin type in a
// mem-initializer.
// Contributed by Kevin Buhr <buhr@stat.wisc.edu>
int r = 0;
struct foo { // ERROR - candidate
foo(int x) { r = 1; } // ERROR - candidate
};
struct bar : foo {
typedef int an_int;
bar() : bar::an_int(3) {} // ERROR - not a base
};
int
main() {
bar b;
return r;
}