From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20088 invoked by alias); 15 Jun 2004 15:56:11 -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 20055 invoked by uid 48); 15 Jun 2004 15:56:09 -0000 Date: Tue, 15 Jun 2004 15:56:00 -0000 Message-ID: <20040615155608.20054.qmail@sourceware.org> From: "bangerth at dealii dot org" 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/msg01860.txt.bz2 List-Id: ------- Additional Comments From bangerth at dealii dot org 2004-06-15 15:56 ------- Hm, yes. In fact, the second line is not helpful at all, since if I insert a semicolon _before_ the 'double', I of course get the same error as before ;-) This problem here seems so obvious that I would rate it as low priority, though. As a general remark: I believe that many of these dreaded "expected primary-expression before XXX" messages are so unhelpful because they wrongly state the context XXX. In this case, we are actually quite happy with what we see until we get to the *= operator. We certainly don't expect anything else before "double", everything is fine up to that point. I have no clue where this comes from, but it seems we should instead print the token where things start go wrong, not the first token of the expression. I think that this probably holds for a good number of the cases where we print this error message. W. -- What |Removed |Added ---------------------------------------------------------------------------- Severity|normal |minor Status|UNCONFIRMED |NEW Ever Confirmed| |1 Keywords| |diagnostic Known to fail| |3.4.0 3.5.0 Last reconfirmed|0000-00-00 00:00:00 |2004-06-15 15:56:06 date| | Summary|[3.4 regression] Strange |[3.4/3.5 regression] Strange |error message with new |error message with new |parser |parser http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16002