aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.8/gcc/testsuite/g++.dg/diagnostic
diff options
context:
space:
mode:
authorAndrew Hsieh <andrewhsieh@google.com>2014-06-20 13:50:27 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2014-06-20 02:04:52 +0000
commit3c447213baf828ebd01c45ad459552b3c9922c92 (patch)
tree198ed6386925c6ff5c24faf686b836aa74082836 /gcc-4.8/gcc/testsuite/g++.dg/diagnostic
parente1be674a8e345aaa025ad9f1d38bab4272301e1d (diff)
parentf190d6284359da8ae8694b2d2e14b01602a959ed (diff)
downloadtoolchain_gcc-3c447213baf828ebd01c45ad459552b3c9922c92.tar.gz
toolchain_gcc-3c447213baf828ebd01c45ad459552b3c9922c92.tar.bz2
toolchain_gcc-3c447213baf828ebd01c45ad459552b3c9922c92.zip
Merge "Merge GCC 4.8.3"
Diffstat (limited to 'gcc-4.8/gcc/testsuite/g++.dg/diagnostic')
-rw-r--r--gcc-4.8/gcc/testsuite/g++.dg/diagnostic/pedantic.C11
-rw-r--r--gcc-4.8/gcc/testsuite/g++.dg/diagnostic/pr58979.C4
-rw-r--r--gcc-4.8/gcc/testsuite/g++.dg/diagnostic/pr59838.C4
3 files changed, 19 insertions, 0 deletions
diff --git a/gcc-4.8/gcc/testsuite/g++.dg/diagnostic/pedantic.C b/gcc-4.8/gcc/testsuite/g++.dg/diagnostic/pedantic.C
new file mode 100644
index 000000000..450a0fac6
--- /dev/null
+++ b/gcc-4.8/gcc/testsuite/g++.dg/diagnostic/pedantic.C
@@ -0,0 +1,11 @@
+// { dg-do compile }
+// { dg-options "-pedantic" }
+typedef void F(void);
+
+void foo()
+{
+ void* p = 0;
+ F* f1 = reinterpret_cast<F*>(p); // { dg-warning "ISO" }
+#pragma GCC diagnostic ignored "-pedantic"
+ F* f2 = reinterpret_cast<F*>(p);
+}
diff --git a/gcc-4.8/gcc/testsuite/g++.dg/diagnostic/pr58979.C b/gcc-4.8/gcc/testsuite/g++.dg/diagnostic/pr58979.C
new file mode 100644
index 000000000..6be3f1436
--- /dev/null
+++ b/gcc-4.8/gcc/testsuite/g++.dg/diagnostic/pr58979.C
@@ -0,0 +1,4 @@
+// PR c++/58979
+// { dg-do compile }
+
+int i = 0->*0; // { dg-error "invalid type argument of" }
diff --git a/gcc-4.8/gcc/testsuite/g++.dg/diagnostic/pr59838.C b/gcc-4.8/gcc/testsuite/g++.dg/diagnostic/pr59838.C
new file mode 100644
index 000000000..d1cf2c7fa
--- /dev/null
+++ b/gcc-4.8/gcc/testsuite/g++.dg/diagnostic/pr59838.C
@@ -0,0 +1,4 @@
+// PR c++/59838
+// { dg-do compile }
+
+enum E { a, b = (E) a }; // { dg-error "conversion to incomplete type" }