This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH][BZ #21326] Ensure C99 and C11 interfaces are available for C++


On Fri, 22 Sep 2017, Jonathan Wakely wrote:

> +#ifdef __cplusplus
> +/* This is to enable compatibility for ISO C++17.  */
> +#if __cplusplus >= 201703L
> +# define __USE_ISOCXX17	1
> +# define __USE_ISOC11	1
> +#endif
> /* This is to enable compatibility for ISO C++11.
> -
> -   So far g++ does not provide a macro.  Check the temporary macro for
> -   now, too.  */
> -#if ((defined __cplusplus && __cplusplus >= 201103L)
> \
> -     || defined __GXX_EXPERIMENTAL_CXX0X__)
> +   Check the temporary macro for now, too.  */
> +#if __cplusplus >= 201103L || defined __GXX_EXPERIMENTAL_CXX0X__
> # define __USE_ISOCXX11	1

There is a comment listing all the __USE_ macros at the top of features.h.  
It should be updated to add __USE_ISOCXX17.  (Actually, it needs 
__USE_ISOCXX11 added as well, but that's a preexisting condition.  And I'm 
not sure __USE_ISOCXX17 should be added at all until there is something to 
condition on it.)

The existing __USE_* macros are also undefined in features.h before being 
possibly defined, including __USE_ISOCXX11.  If a new __USE_ISOCXX17 is 
added, it should be added to that #undef sequence as well.

-- 
Joseph S. Myers
joseph@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]