[C++ PATCH] Deprecate -ffriend-injection
[official-gcc.git] / gcc / testsuite / gcc.dg / typedef-init.c
blob52928da9a6916265a0bd10102a3ded45d60023f6
1 /* { dg-do compile } */
2 /* { dg-options "-std=gnu89" } // suppress default -pedantic-errors */
4 /* This code used to be a legitimate, if dubious, extension. However,
5 it's been broken since GCC 3.0 (caused ICE) and we have now removed
6 the extension. See PR c/7353. */
8 /* Case A: just the bare name = initializer. */
10 typedef A = 0; /* { dg-error "initialized" "A" } */
11 A a; /* { dg-bogus "" "A error cascade" } */
13 /* Case B: with a type also. */
15 typedef int B = 0; /* { dg-error "initialized" "B" } */
16 B b; /* { dg-bogus "" "B error cascade" } */