aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/auto1.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/g++.dg/cpp0x/auto1.C')
-rw-r--r--gcc-4.9/gcc/testsuite/g++.dg/cpp0x/auto1.C9
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/auto1.C b/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/auto1.C
new file mode 100644
index 0000000..b8d3905
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/auto1.C
@@ -0,0 +1,9 @@
+// { dg-do compile { target c++11 } }
+// { dg-options "-std=c++98 -Wc++11-compat" }
+
+// Test warning for use of auto in C++98 mode with C++11
+// compatibility warnings
+void f()
+{
+ auto int x = 5; // { dg-warning "changes meaning" }
+}