public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "mmitchel at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/26058] [4.0/4.1/4.2 Regression] C++ error recovery regression
Date: Wed, 31 May 2006 19:54:00 -0000	[thread overview]
Message-ID: <20060531195405.28714.qmail@sourceware.org> (raw)
In-Reply-To: <bug-26058-6809@http.gcc.gnu.org/bugzilla/>



------- Comment #6 from mmitchel at gcc dot gnu dot org  2006-05-31 19:54 -------
GCC 3.3 isn't really a very good benchmark, since the parser there didn't
handle much of the language.  We'd have to figure out what it actually did for
recovery (how many tokens did it skip, where did it pick things back up), and
then decide if that was a workable strategy.

Fundamentally, though, you only have three options:

1. Skip until you see the end of the block (EDG behavior)

2. Pop to global scope.  Problem: if the user accidentally had a definition in
local scope, but intended the following stuff to be in the local scope, then
you get confused.

3. Stay in local scope (current GCC behavior).  Problem: if the user forgot the
closing brace (and so intended stuff to be in the global scope), then you get
confused.


-- 


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


  parent reply	other threads:[~2006-05-31 19:54 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-01  2:13 [Bug c++/26058] New: " sabre at nondot dot org
2006-02-01  2:18 ` [Bug c++/26058] [3.4/4.0/4.1/4.2 Regression] " pinskia at gcc dot gnu dot org
2006-03-01  5:13 ` gdr at gcc dot gnu dot org
2006-03-01  5:14 ` pinskia at gcc dot gnu dot org
2006-03-11  3:20 ` mmitchel at gcc dot gnu dot org
2006-05-31  4:54 ` [Bug c++/26058] [4.0/4.1/4.2 " mmitchel at gcc dot gnu dot org
2006-05-31 19:14 ` sabre at nondot dot org
2006-05-31 19:14 ` sabre at nondot dot org
2006-05-31 19:54 ` mmitchel at gcc dot gnu dot org [this message]
2006-05-31 22:17 ` sabre at nondot dot org
2006-05-31 22:56 ` mark at codesourcery dot com
2006-05-31 23:00 ` sabre at nondot dot org

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=20060531195405.28714.qmail@sourceware.org \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /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).