On Thu, Dec 29, 2011 at 08:12:51PM -0800, Steve Kargl wrote:
> The audit trail in the PR pretty much sums up the problem.
> OK to commit?

Can you tune up the comments a little bit?
If you look up http://gcc.gnu.org/gcc-4.7/cxx0x_status.html
you'll see that most of the C++11 features are already implemented
(and e.g. at_quick_exit is implemented too in some libcs), so the
__cplusplus macro isn't lying.  Clang apparently defines __cplusplus
to 201103L much longer than GCC does, yet it supports much smaller subset
of C++11.  Apparently it parses the C++11 generalized attribute syntax,
but at least clang 3.0 doesn't complain at all about anything between
the [[ and ]] pair, [[foobar, foobaz (bar, baz, 2, 6, 0x1z2)]] void bar (void);
is parsed just fine, and with [[noreturn]] it miscompiles even the first
[[noreturn]] trivial testcase I wrote.
See
http://gcc.gnu.org/ml/gcc-patches/2011-10/msg02027.html
for why we set __cplusplus to the value we do.
So please leave about the "disgusting", "brain damage", "lies" etc.

> 2011-12-29  Steven G. Kargl  <ka...@gcc.gnu.org>
> 
>       * inclhack.def:  Disgusting hack to workaround brain damage of
>       defining __cplusplus as 201103L with -std=c++11 when g++ does
>       not support c++11.
>       * fixincl.x: regenerated.
>       * genfixes: Fix to version test.
> 
> -- 
> Steve

> Index: inclhack.def
> ===================================================================
> --- inclhack.def      (revision 182738)
> +++ inclhack.def      (working copy)
> @@ -20,6 +20,21 @@ autogen definitions fixincl;
>  FIXINC_DEBUG = yes;
>  #endif
>  
> +/*
> + * g++ -std=c++11 defines __cplusplus to 201103L, which lies about
> + * the level of support g++ has for the C++11 standard.
> + */

        Jakub

Reply via email to