OSDN Git Service

gcc/
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / deprecated-5.c
diff --git a/gcc/testsuite/gcc.dg/deprecated-5.c b/gcc/testsuite/gcc.dg/deprecated-5.c
new file mode 100644 (file)
index 0000000..133e60e
--- /dev/null
@@ -0,0 +1,7 @@
+/* Test __attribute__((deprecated)).  Test types without names.  */
+/* Origin: Joseph Myers <jsm@polyomino.org.uk> */
+/* { dg-do compile } */
+/* { dg-options "" } */
+
+struct { int a; } __attribute__((deprecated ("Do not use"))) x; /* { dg-warning "type is deprecated" } */
+typeof(x) y; /* { dg-warning "type is deprecated .declared at .*.: Do not use" } */