re PR middle-end/19583 (Incorrect diagnostic: control may reach end of non-void funct...
authorIan Lance Taylor <ian@airs.com>
Wed, 9 Feb 2005 21:40:35 +0000 (21:40 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Wed, 9 Feb 2005 21:40:35 +0000 (21:40 +0000)
PR middle-end/19583
* g++.dg/warn/Wreturn-type-3.C: New test.

From-SVN: r94778

gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/warn/Wreturn-type-3.C [new file with mode: 0644]

index 2cfb809faf3cc1cb2e8b58b767c2a00fa76373ea..12f30ebd53c6cdbf6ce40fb3b32fbb99345140f2 100644 (file)
@@ -1,3 +1,8 @@
+2005-02-09  Ian Lance Taylor  <ian@airs.com>
+
+       PR middle-end/19583
+       * g++.dg/warn/Wreturn-type-3.C: New test.
+
 2005-02-09  Richard Guenther  <rguenth@gcc.gnu.org>
 
        PR middle-end/19402
diff --git a/gcc/testsuite/g++.dg/warn/Wreturn-type-3.C b/gcc/testsuite/g++.dg/warn/Wreturn-type-3.C
new file mode 100644 (file)
index 0000000..f13d587
--- /dev/null
@@ -0,0 +1,14 @@
+// PR middle-end/19583
+// { dg-options "-Wreturn-type -O" }
+
+struct E{};
+
+inline int bar() throw(E)
+{
+  return 0;
+}
+
+void foo ()
+{
+  bar();
+}