[cfe-dev] Preliminary reinterpret_cast Sema patch

Argiris Kirtzidis akyrtzi at gmail.com
Tue Oct 21 13:49:10 PDT 2008


Doug Gregor wrote:
> Sure, it's ambiguous, but we shouldn't warn about it because the code
> isn't wrong (and isn't likely to be wrong).
>   

Ambiguous resolutions confuse people in general which was why I added 
the warning.
But I don't have a strong opinion on how useful this warning is; e.g. it 
warns people over declarations that look like constructor calls but it's 
not likely for people to write stuff like

T1(T2(x));

since creating an object like that isn't very useful.
If the consensus is that the warning doesn't add much value I'll remove it.

On another note, I find the function declarator ambiguous warning 
useful, since stuff like this:

T1 x(T2(y));

are more likely to occur and confuse people.

-Argiris



More information about the cfe-dev mailing list