[Bug c++/15766] bad parse error recovery (2 bugs)
manu at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Tue Aug 4 09:35:00 GMT 2009
------- Comment #6 from manu at gcc dot gnu dot org 2009-08-04 09:34 -------
For the first testcase, A could well be defined without type, so "const A"
would be valid. So we definitely need to emit another error before '&' but the
current one is misleading. Perhaps "parse error before '&'" is a solution. The
alternative is to parse tentatively everything up to a comma or closing
parenthesis and then find out what went wrong. That way, perhaps we can tell
that A was meant to be a type but it is not declared. I wonder what comeau,
clang and other c++ compilers report here.
--
manu at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed|2005-06-20 04:13:50 |2009-08-04 09:34:58
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15766
More information about the Gcc-bugs
mailing list