This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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] PR c++/69462: Provide FLT_EVAL_METHOD and DECIMAL_DIG in float.h.


On 28/01/16 15:42 +0100, Jakub Jelinek wrote:
On Thu, Jan 28, 2016 at 01:32:18PM +0000, Jonathan Wakely wrote:
On 28/01/16 13:40 +0100, Dominik Vogt wrote:
>The attached patch (written by Jonathan, not me) makes
>FLT_EVAL_METHOD and DECIMAL_DIG available in C++-11 as they should
>be.
>
>https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69462
>
>Can this be committed (should it wait for stage1)?

I've just noticed we should also do the following, although this can
definitely wait for stage 1 as it works fine as is (unlike Dominik's
<float.h> case which is a conformance bug).

--- a/gcc/ginclude/stdarg.h
+++ b/gcc/ginclude/stdarg.h
@@ -47,7 +47,7 @@ typedef __builtin_va_list __gnuc_va_list;
#define va_start(v,l)  __builtin_va_start(v,l)
#define va_end(v)      __builtin_va_end(v)
#define va_arg(v,l)    __builtin_va_arg(v,l)
-#if !defined(__STRICT_ANSI__) || __STDC_VERSION__ + 0 >= 199900L || defined(__GXX_EXPERIMENTAL_CXX0X__)
+#if !defined(__STRICT_ANSI__) || __STDC_VERSION__ + 0 >= 199900L || __cplusplus + 0 >= 201103L
#define va_copy(d,s)   __builtin_va_copy(d,s)
#endif
#define __va_copy(d,s) __builtin_va_copy(d,s)

This is ok, but please fix up the formatting (avoid too long line).

I've committed the attached version, wrapping the line.


commit 92f4d9e8d059d2d1bad1dcea30ec44b60a5c35e7
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Fri Jan 29 11:58:17 2016 +0000

    Test __cplusplus instead of __GXX_EXPERIMENTAL_CXX0X__
    
    	* ginclude/stdarg.h: Test __cplusplus instead of
    	__GXX_EXPERIMENTAL_CXX0X__.

diff --git a/gcc/ginclude/stdarg.h b/gcc/ginclude/stdarg.h
index 74a234d..6525152 100644
--- a/gcc/ginclude/stdarg.h
+++ b/gcc/ginclude/stdarg.h
@@ -47,7 +47,8 @@ typedef __builtin_va_list __gnuc_va_list;
 #define va_start(v,l)	__builtin_va_start(v,l)
 #define va_end(v)	__builtin_va_end(v)
 #define va_arg(v,l)	__builtin_va_arg(v,l)
-#if !defined(__STRICT_ANSI__) || __STDC_VERSION__ + 0 >= 199900L || defined(__GXX_EXPERIMENTAL_CXX0X__)
+#if !defined(__STRICT_ANSI__) || __STDC_VERSION__ + 0 >= 199900L \
+    || __cplusplus + 0 >= 201103L
 #define va_copy(d,s)	__builtin_va_copy(d,s)
 #endif
 #define __va_copy(d,s)	__builtin_va_copy(d,s)

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