From: zack Date: Fri, 12 Oct 2001 03:34:39 +0000 (+0000) Subject: * toplev.c (compile_file): Ignore return value from yyparse. X-Git-Tag: upstream/4.9.2~91617 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d292784ce9f4120fdec89bff57c9b9daa58e679b;p=platform%2Fupstream%2Flinaro-gcc.git * toplev.c (compile_file): Ignore return value from yyparse. Always pop any nested binding levels after yyparse returns. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@46223 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ca80a41..7d07060 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2001-10-11 Zack Weinberg + + * toplev.c (compile_file): Ignore return value from yyparse. + Always pop any nested binding levels after yyparse returns. + 2001-10-11 Richard Henderson * doc/c-tree.texi (Expression trees): Add VTABLE_REF. diff --git a/gcc/toplev.c b/gcc/toplev.c index e940aa6..ab83065 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -2118,8 +2118,9 @@ pop_srcloc () lineno = input_file_stack->line; } -/* Compile an entire file of output from cpp, named NAME. - Write a file of assembly output and various debugging dumps. */ +/* Compile an entire translation unit, whose primary source file is + named NAME. Write a file of assembly output and various debugging + dumps. */ static void compile_file (name) @@ -2140,7 +2141,7 @@ compile_file (name) init_timevar (); timevar_start (TV_TOTAL); - /* Open assembler code output file. Do this even if -fsyntax-only is on, + /* Open assembly code output file. Do this even if -fsyntax-only is on, because then the driver will have provided the name of a temporary file or bit bucket for us. */ @@ -2324,17 +2325,12 @@ compile_file (name) /* Call the parser, which parses the entire file (calling rest_of_compilation for each function). */ + yyparse (); - if (yyparse () != 0) - { - if (errorcount == 0) - fnotice (stderr, "Errors detected in input file (your bison.simple is out of date)\n"); - - /* In case there were missing closebraces, - get us back to the global binding level. */ - while (! global_bindings_p ()) - poplevel (0, 0, 0); - } + /* In case there were missing block closers, + get us back to the global binding level. */ + while (! global_bindings_p ()) + poplevel (0, 0, 0); /* Compilation is now finished except for writing what's left of the symbol table output. */