Date: Fri, 5 Sep 2014 05:36:33 +0000 (UTC) From: Ed Schouten <ed@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271155 - in head: include sys/sys Message-ID: <201409050536.s855aXgD095858@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ed Date: Fri Sep 5 05:36:32 2014 New Revision: 271155 URL: http://svnweb.freebsd.org/changeset/base/271155 Log: Roll back r271012 even more aggressively. I've looked at the GCC sources and I now understand what's going wrong. THe C11 keywords are simply nonexistent when using C++ mode. They are marked as C-only in the parser. This is absolutely impractical for multiple reasons: - The C11 keywords do not conflict with C++ naming rules. They all start with _[A-Z]. There is no reason to make them C-only. - It makes it practically impossible for people to use these keywords in C header files and expect them to work from within C++ sources. As I said in my previous commit message: GCC is by far the weirdest compiler that I've ever used. Modified: head/include/tgmath.h head/sys/sys/cdefs.h Modified: head/include/tgmath.h ============================================================================== --- head/include/tgmath.h Fri Sep 5 05:20:52 2014 (r271154) +++ head/include/tgmath.h Fri Sep 5 05:36:32 2014 (r271155) @@ -61,7 +61,7 @@ */ #if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || \ - __has_extension(c_generic_selections) || __GNUC_PREREQ__(4, 9) + __has_extension(c_generic_selections) #define __tg_generic(x, cfnl, cfn, cfnf, fnl, fn, fnf) \ _Generic(x, \ long double _Complex: cfnl, \ Modified: head/sys/sys/cdefs.h ============================================================================== --- head/sys/sys/cdefs.h Fri Sep 5 05:20:52 2014 (r271154) +++ head/sys/sys/cdefs.h Fri Sep 5 05:36:32 2014 (r271155) @@ -254,7 +254,7 @@ #if !defined(__STDC_VERSION__) || __STDC_VERSION__ < 201112L -#if !__has_extension(c_alignas) && !__GNUC_PREREQ__(4, 7) +#if !__has_extension(c_alignas) #if (defined(__cplusplus) && __cplusplus >= 201103L) || \ __has_extension(cxx_alignas) #define _Alignas(x) alignas(x) @@ -264,13 +264,11 @@ #endif #endif -#if !__GNUC_PREREQ__(4, 7) #if defined(__cplusplus) && __cplusplus >= 201103L #define _Alignof(x) alignof(x) #else #define _Alignof(x) __alignof(x) #endif -#endif #if !__has_extension(c_atomic) && !__has_extension(cxx_atomic) /* @@ -286,7 +284,7 @@ #define _Noreturn __dead2 #endif -#if !__has_extension(c_static_assert) && !__GNUC_PREREQ__(4, 7) +#if !__has_extension(c_static_assert) #if (defined(__cplusplus) && __cplusplus >= 201103L) || \ __has_extension(cxx_static_assert) #define _Static_assert(x, y) static_assert(x, y) @@ -325,7 +323,7 @@ */ #if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || \ - __has_extension(c_generic_selections) || __GNUC_PREREQ__(4, 9) + __has_extension(c_generic_selections) #define __generic(expr, t, yes, no) \ _Generic(expr, t: yes, default: no) #elif __GNUC_PREREQ__(3, 1) && !defined(__cplusplus)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201409050536.s855aXgD095858>