[C++ RFC / patch] PR 32674

Paolo Carlini pcarlini@suse.de
Thu Sep 6 16:14:00 GMT 2007


Mark Mitchell wrote:

>I'm not sure; we might be parsing this as a comma-expression.  My memory
>of the grammar is that we shouldn't be doing that, but I'd have to
>recheck in detail.
>
>What about just:
>
>  int i(3, 7);
>  
>
This is rejected as "initializer expression list treated as compound 
expression".

But this is accepted:

    int i = (3, 7);

and the behavior is thus consistent. I agree about a comma-expression, 
things seems ok after all ;)

Paolo.



More information about the Gcc-patches mailing list