summaryrefslogtreecommitdiff
path: root/gcc/cexp.y
diff options
context:
space:
mode:
authorkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>1997-02-16 12:46:24 +0000
committerkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>1997-02-16 12:46:24 +0000
commita17e28e1c861acbaf820aaa244b96fea048f8f0c (patch)
tree07c693600d96a10eae88f1ac633248dba2f707d8 /gcc/cexp.y
parent0d344634e053fbd998acc89cf022bebd21780a4d (diff)
downloadgcc-a17e28e1c861acbaf820aaa244b96fea048f8f0c.tar.gz
(parse_c_expression): Don't check for null lexptr or *lexptr == 0. If
yyparse returns nonzero value, abort. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@13655 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cexp.y')
-rw-r--r--gcc/cexp.y11
1 files changed, 3 insertions, 8 deletions
diff --git a/gcc/cexp.y b/gcc/cexp.y
index dd4d16495f0..ac5c243c5e6 100644
--- a/gcc/cexp.y
+++ b/gcc/cexp.y
@@ -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.");