re PR c++/9264 ([parser] ICE on invalid octal constant)
authorMark Mitchell <mark@codesourcery.com>
Mon, 13 Jan 2003 00:14:59 +0000 (00:14 +0000)
committerMark Mitchell <mmitchel@gcc.gnu.org>
Mon, 13 Jan 2003 00:14:59 +0000 (00:14 +0000)
PR c++/9264
* c-lex.c (c_lex): Set the token value to error_mark_node for
invalid numeric constants.

PR c++/9264
* g++.dg/parse/octal1.C: New file.

From-SVN: r61235

gcc/ChangeLog
gcc/c-lex.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/parse/octal1.C [new file with mode: 0644]

index 7f04cf60572cf119fea7550abaf3f29e741fa491..efcc635378344082067ec6f77ed44f1992a1142e 100644 (file)
@@ -1,3 +1,9 @@
+2003-01-12  Mark Mitchell  <mark@codesourcery.com>
+
+       PR c++/9264
+       * c-lex.c (c_lex): Set the token value to error_mark_node for
+       invalid numeric constants.
+
 2003-01-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
 
        * c-pch.c (asm_file_startpos): Change to `long'.
index a689ccab004ee3e1bd903b60be61ff8fc9e6c605..ab068207e1d7a224aa9c81980889b32cd6dce396 100644 (file)
@@ -712,6 +712,7 @@ c_lex (value)
          {
          case CPP_N_INVALID:
            /* cpplib has issued an error.  */
+           *value = error_mark_node;
            break;
 
          case CPP_N_INTEGER:
index 8016c47ad329c2ed3ffe3a8ae96205a393bc65c0..56da2f3e27a4e51b399d2c9ae0b6deb33b03ddf8 100644 (file)
@@ -1,3 +1,11 @@
+2003-01-12  Mark Mitchell  <mark@codesourcery.com>
+
+       PR c++/9264
+       * g++.dg/parse/octal1.C: New file.
+
+       PR c++/9172
+       * g++.dg/parse/typename1.C: New file.
+
 2003-01-10  Danny Smith  <dannysmith@users.sourceforge.net>
 
        * gcc.dg/bf-ms-layout.c: Enable for cygwin and mingw32 targets.
diff --git a/gcc/testsuite/g++.dg/parse/octal1.C b/gcc/testsuite/g++.dg/parse/octal1.C
new file mode 100644 (file)
index 0000000..8d62eef
--- /dev/null
@@ -0,0 +1 @@
+int i = 08; // { dg-error "" }