public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Paolo Carlini <paolo.carlini@oracle.com>
To: Richard Guenther <richard.guenther@gmail.com>
Cc: Steven Bosscher <stevenb.gcc@gmail.com>,
	       GCC Mailing List <gcc@gcc.gnu.org>,
	       GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [patch][RFC] bail out after front-end errors
Date: Tue, 27 Mar 2012 09:50:00 -0000	[thread overview]
Message-ID: <4F718C81.70501@oracle.com> (raw)
In-Reply-To: <CAFiYyc32n26u-QL8Y+oQ+eEHu4+o4V2z0wb2MHV4MbVPm-NPDQ@mail.gmail.com>

Hi,
> On Mon, Mar 26, 2012 at 10:56 PM, Steven Bosscher<stevenb.gcc@gmail.com>  wrote:
>> Hello,
>>
>> This patch is one way to address PR44982. I see no good reason to
>> cgraph_finalize_compilation_unit if there were parse errors. As Richi
>> already pointed out, GCC traditionally has proceeded after parse
>> errors to preserve warnings and errors we generate from the middle-end
>> and during semantic analysis. But it seems to me that those warnings
>> are not very meaningful after parse errors (-Wuninitialized after a
>> parse error??), and errors from the middle end are mostly for exotic
>> code (involving asm()s and the like). Bailing out after parse errors
>> is therefore IMHO the right thing to do for the common case.
>>
>> Thoughts? Comments?
> Conceptually it makes sense.  Did you check whether allowing the
> FE too proceed to final_write_globals but stop before
> cgraph_finalize_compilation_unit
> preserves any errors?  I would expect that maybe FE global variable
> diagostics are defered until that?  It would be nice to finally move
> the call to cgraph_finalize_compilation_unit to the middle-end ...
> (warning, if you try that you run into an issue with the Java frontend ... :/)
I bet it does preserve some errors. I noticed that when I analyzed a bit 
PR40405, see Comment #3 in particular.

Thanks,
Paolo.

  reply	other threads:[~2012-03-27  9:50 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-26 20:56 Steven Bosscher
2012-03-27  7:17 ` Richard Guenther
2012-03-27  9:50   ` Paolo Carlini [this message]
     [not found]   ` <CABu31nOcM81G89w4G2LKn0KoSNamLpgTO07YjZm=-9a94CQttA@mail.gmail.com>
     [not found]     ` <CAFiYyc0S4358PFGyzJjqe_Uw=H-DmGH4n+C=AvO1Xx-nQOLD9A@mail.gmail.com>
2012-12-28 17:36       ` Steven Bosscher
2013-01-02 15:07         ` Richard Biener
2012-03-27 19:00 ` Mike Stump
2012-03-27 19:13   ` Steven Bosscher

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F718C81.70501@oracle.com \
    --to=paolo.carlini@oracle.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=gcc@gcc.gnu.org \
    --cc=richard.guenther@gmail.com \
    --cc=stevenb.gcc@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).