On Tue, Apr 21, 2015 at 12:28 PM, Charlie Turner <[email protected]
> wrote:

> Hi Richard, thanks for taking a look.
>
> The motivation is that I have code that looks a bit like,
>
> ------------------8<--------------------------
> typedef bool BOOL;
>
> class Foo {
>     static const BOOL __is_signed;
>

__is_signed is a reserved identifier, so your code is ill-formed (no
diagnostic required). The existing compatibility hack exists to work around
an issue with libstdc++, which (being part of the implementation) is
permitted to use names like this, not to support user code doing this sort
of thing.


>   };
>
> #include <map>
>
> int main() {}
> ------------------>8--------------------------
>
> and that Clang fails to compile it,
>
> test.c:4:23: error: expected member name or ';' after declaration
> specifiers
>     static const BOOL __is_signed;
>     ~~~~~~~~~~~~~~~~~ ^
>
> - Charlie.
> _______________________________________________
> cfe-commits mailing list
> [email protected]
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to