From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20273 invoked by alias); 2 May 2003 14:06:01 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 20181 invoked by uid 71); 2 May 2003 14:06:01 -0000 Resent-Date: 2 May 2003 14:06:01 -0000 Resent-Message-ID: <20030502140601.20180.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org Resent-Reply-To: gcc-gnats@gcc.gnu.org, pfeifer@dbai.tuwien.ac.at Received: (qmail 18754 invoked by uid 48); 2 May 2003 14:02:01 -0000 Message-Id: <20030502140201.18753.qmail@sources.redhat.com> Date: Fri, 02 May 2003 14:06:00 -0000 From: pfeifer@dbai.tuwien.ac.at Reply-To: pfeifer@dbai.tuwien.ac.at To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version: gnatsweb-2.9.3 (1.1.1.1.2.31) Subject: c++/10603: [3.4 regression] [new parser] failing to print problematic token upon parse error X-SW-Source: 2003-05/txt/msg00132.txt.bz2 List-Id: >Number: 10603 >Category: c++ >Synopsis: [3.4 regression] [new parser] failing to print problematic token upon parse error >Confidential: no >Severity: non-critical >Priority: medium >Responsible: unassigned >State: open >Class: change-request >Submitter-Id: net >Arrival-Date: Fri May 02 14:06:01 UTC 2003 >Closed-Date: >Last-Modified: >Originator: pfeifer@dbai.tuwien.ac.at >Release: unknown-1.0 >Organization: >Environment: gcc version 3.4 20030502 (experimental) >Description: Our diagnoses for the following piece of code used to be int f(int not) { return 1-not; } rather confusing, but now the source of the problem really is very hard to see: x.cc:1: error: expected primary-expression x.cc:1: error: expected `,' or `;' (Hint: the problem is that "not" is parsed as "!".) >How-To-Repeat: % /sw/gcc-3.2.2/bin/g++ x.cc x.cc:1: parse error before `!' token x.cc: In function `int f(...)': x.cc:2: parse error before `;' token % gccvs x.cc x.cc:1: error: expected primary-expression x.cc:1: error: expected `,' or `;' >Fix: Also provide the token that lead to the parse error, so that the user can see the actual problem. >Release-Note: >Audit-Trail: >Unformatted: