From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29517 invoked by alias); 26 Oct 2008 01:43:55 -0000 Received: (qmail 29291 invoked by uid 48); 26 Oct 2008 01:42:32 -0000 Date: Sun, 26 Oct 2008 01:43:00 -0000 Message-ID: <20081026014232.29290.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug c++/26997] g++ reports misleading error message when the identifier with error occurs earlier on the same line In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "manu at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2008-10/txt/msg01656.txt.bz2 ------- Comment #4 from manu at gcc dot gnu dot org 2008-10-26 01:42 ------- The culprit is (yet again) parsing tentatively. cp_parser_cast_expression parses tentatively the whole: (t *)malloc(sizeof(t) * t->a) not committing to parse definitively at any moment. Hence, when this fails, the whole thing is rejected and there is no way to know where the error occurred. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26997