summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp0x/bracket3.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/cpp0x/bracket3.C')
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/bracket3.C10
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/cpp0x/bracket3.C b/gcc/testsuite/g++.dg/cpp0x/bracket3.C
new file mode 100644
index 000000000..4ef7a0e9d
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/bracket3.C
@@ -0,0 +1,10 @@
+// { dg-options "-std=c++98 -Wc++0x-compat" }
+
+template<int N> struct X {};
+
+X<1 >> 2> x; // { dg-warning "will be treated as|suggest parentheses" }
+
+// From cp/parser.c
+typedef int Y;
+template <int V> struct Foo {};
+Foo<Y () >> 5> r; // { dg-warning "will be treated as|suggest parentheses" }