[Bug c++/16002] [3.4/3.5 regression] Strange error message with new parser
bangerth at dealii dot org
gcc-bugzilla@gcc.gnu.org
Tue Jun 15 15:56:00 GMT 2004
------- 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
More information about the Gcc-bugs
mailing list