From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28745 invoked by alias); 31 May 2006 19:54:13 -0000 Received: (qmail 28715 invoked by uid 48); 31 May 2006 19:54:05 -0000 Date: Wed, 31 May 2006 19:54:00 -0000 Message-ID: <20060531195405.28714.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug c++/26058] [4.0/4.1/4.2 Regression] C++ error recovery regression In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "mmitchel at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2006-05/txt/msg03239.txt.bz2 List-Id: ------- 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