From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14009 invoked by alias); 16 Jun 2004 10:16:23 -0000 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 Received: (qmail 14001 invoked by uid 48); 16 Jun 2004 10:16:22 -0000 Date: Wed, 16 Jun 2004 10:16:00 -0000 Message-ID: <20040616101622.14000.qmail@sourceware.org> From: "giovannibajo at libero dot it" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20040615153113.16002.rguenth@tat.physik.uni-tuebingen.de> References: <20040615153113.16002.rguenth@tat.physik.uni-tuebingen.de> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c++/16002] [3.4/3.5 regression] Strange error message with new parser X-Bugzilla-Reason: CC X-SW-Source: 2004-06/txt/msg01968.txt.bz2 List-Id: ------- Additional Comments From giovannibajo at libero dot it 2004-06-16 10:16 ------- Not so easy, though. The parser tries several different constructs that can happen at statement level (function declaration, variable declaration, etc.). They are all equally possible, and they all fail at different tokens. So the error "expected primary expression before XXX", it actually means "starting from XXX, I could not find a valid primary expression". In this case, I think we should consider the variable declaration to be OK even without ';' so that we emit a missing semicolon error, and then skip all the token till the end of the line. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16002