------- 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