diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/cpp0x/auto1.C')
-rw-r--r-- | gcc/testsuite/g++.dg/cpp0x/auto1.C | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/cpp0x/auto1.C b/gcc/testsuite/g++.dg/cpp0x/auto1.C new file mode 100644 index 000000000..9e274b622 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/auto1.C @@ -0,0 +1,8 @@ +// { dg-options "-std=c++98 -Wc++0x-compat" } + +// Test warning for use of auto in C++98 mode with C++0x +// compatibility warnings +void f() +{ + auto int x = 5; // { dg-warning "will change meaning" } +} |