PR c++/26997 g++ reports misleading error message when the identifier with error occurs earlier on the same line

Manuel López-Ibáñez lopezibanez@gmail.com
Tue Oct 28 09:33:00 GMT 2008


2008/10/28 Mark Mitchell <mark@codesourcery.com>:
>
>  (X) ; // Not a cast.
>  (X) 3 ... // A cast.

What about ?
(C())*var;

 or

(C())+var;

We currently parse the above as casts. Is that correct?

If I understand correctly (C()) followed by comma, semicolon, period,
'->' or unambiguous binary operator must be a call to constructor,
anything else must be a cast. Am I right?

Cheers,

Manuel.



More information about the Gcc-patches mailing list