blob: 5b51e8bde17f089b82c98a3f1f12ae12711873f7 [file] [log] [blame]
// { dg-do assemble }
// 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 {
foo(int x) { r = 1; }
};
struct bar : foo {
typedef int an_int;
bar() : bar::an_int(3) {} // { dg-error "" } not a base
};
int
main() {
bar b;
return r;
}