diff options
author | Richard Kenner <kenner@gcc.gnu.org> | 1997-02-16 07:46:24 -0500 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 1997-02-16 07:46:24 -0500 |
commit | 422c6060b6df8cdf0200cd69c1968ebfff214d3e (patch) | |
tree | 07c693600d96a10eae88f1ac633248dba2f707d8 /gcc | |
parent | a5ac8bef0054cfe3ce8d1f83d881d6a966b57c23 (diff) | |
download | gcc-422c6060b6df8cdf0200cd69c1968ebfff214d3e.zip gcc-422c6060b6df8cdf0200cd69c1968ebfff214d3e.tar.gz gcc-422c6060b6df8cdf0200cd69c1968ebfff214d3e.tar.bz2 |
(parse_c_expression): Don't check for null lexptr or *lexptr == 0.
(parse_c_expression): Don't check for null lexptr or *lexptr == 0. If
yyparse returns nonzero value, abort.
From-SVN: r13655
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/cexp.y | 11 |
1 files changed, 3 insertions, 8 deletions
@@ -1042,11 +1042,6 @@ parse_c_expression (string) char *string; { lexptr = string; - - if (lexptr == 0 || *lexptr == 0) { - error ("empty #if expression"); - return 0; /* don't include the #if group */ - } /* if there is some sort of scanning error, just return 0 and assume the parsing routine has printed an error message somewhere. @@ -1054,9 +1049,9 @@ parse_c_expression (string) if (setjmp (parse_return_error)) return 0; - if (yyparse ()) - return 0; /* actually this is never reached - the way things stand. */ + if (yyparse () != 0) + abort (); + if (*lexptr != '\n') error ("Junk after end of expression."); |