[cfe-dev] Clang/C++ problem?

Steven Watanabe watanabesj at gmail.com
Mon Jan 24 14:20:21 PST 2011


AMDG

On 1/24/2011 1:56 PM, Marshall Clow wrote:
>
> No it does not - but gcc doesn't accept it either.
> $ g++ junk.cpp
> junk.cpp:2: error: invalid combination of multiple type-specifiers
>
> On the other hand, clang doesn't like this (and gcc thinks that it's fine)
> 	DoSomething ((unsigned Foo_t)(foo));
>
> I've opened bug #9040, but I'm still updating it.
>

I think gcc is wrong.  None of these should be
accepted.  Is there a good reason to match gcc here?
[dcl.type] is pretty precise about what's allowed
and a typedef-name is distinct from int.

In Christ,
Steven Watanabe



More information about the cfe-dev mailing list