OSDN Git Service

* spew.c (end_input): No longer static.
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 9 Oct 2001 15:44:17 +0000 (15:44 +0000)
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 9 Oct 2001 15:44:17 +0000 (15:44 +0000)
        * cp-tree.h: Declare it.
        * parse.y (datadef): Add "error END_OF_SAVED_INPUT" expansion.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@46124 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/testsuite/g++.dg/parse/saved1.C [new file with mode: 0644]

diff --git a/gcc/testsuite/g++.dg/parse/saved1.C b/gcc/testsuite/g++.dg/parse/saved1.C
new file mode 100644 (file)
index 0000000..f728108
--- /dev/null
@@ -0,0 +1,6 @@
+// Test that the parser doesn't go into an infinite loop from ignoring the
+// PRE_PARSED_FUNCTION_DECL token.
+
+class C { static void* operator new(size_t); }; // { dg-error "" "" }
+void* C::operator new(size_t) { return 0; } // { dg-error "" "" }
+class D { D(int i): integer(i){}}; // { dg-error "" "" }