http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44982

--- Comment #4 from rguenther at suse dot de <rguenther at suse dot de> 
2010-12-18 20:22:18 UTC ---
On Fri, 17 Dec 2010, steven at gcc dot gnu.org wrote:

> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44982
> 
> Steven Bosscher <steven at gcc dot gnu.org> changed:
> 
>            What    |Removed                     |Added
> ----------------------------------------------------------------------------
>                  CC|                            |rguenth at gcc dot gnu.org
> 
> --- Comment #3 from Steven Bosscher <steven at gcc dot gnu.org> 2010-12-17 
> 21:26:45 UTC ---
> I see no reason to cgraph_finalize_compilation_unit if there were parse 
> errors.
> Richi, what do you think?

I think the idea was we want to preserve warnings and errors we generate
from the middle-end.  But the patch looks sensible to me anyway, maybe
post it up for disscussion, as it would affect all frontends.

Richard.

> 
> Index: toplev.c
> ===================================================================
> --- toplev.c    (revision 167996)
> +++ toplev.c    (working copy)
> @@ -582,7 +582,12 @@
>       what's left of the symbol table output.  */
>    timevar_pop (TV_PARSE);
> 
> -  if (flag_syntax_only || flag_wpa)
> +  /* If all we have to do is syntax checking, or if there were parse
> +     errors, stop here.  */
> +  if (flag_syntax_only || seen_error)
> +    return;
> +
> +  if (flag_wpa)
>      return;
> 
>    ggc_protect_identifiers = false;
> @@ -590,9 +595,6 @@
>    /* This must also call cgraph_finalize_compilation_unit.  */
>    lang_hooks.decls.final_write_globals ();
> 
> -  if (seen_error ())
> -    return;
> -
>    varpool_assemble_pending_decls ();
>    finish_aliases_2 ();
> 
>

Reply via email to