* [PATCH] PR c++/69462: Provide FLT_EVAL_METHOD and DECIMAL_DIG in float.h. @ 2016-01-28 12:40 Dominik Vogt 2016-01-28 13:32 ` Jonathan Wakely 2016-01-28 14:41 ` Jakub Jelinek 0 siblings, 2 replies; 8+ messages in thread From: Dominik Vogt @ 2016-01-28 12:40 UTC (permalink / raw) To: gcc-patches; +Cc: Andreas Krebbel, Jonathan Wakely [-- Attachment #1: Type: text/plain, Size: 285 bytes --] 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)? Ciao Dominik ^_^ ^_^ -- Dominik Vogt IBM Germany [-- Attachment #2: 0001-ChangeLog --] [-- Type: text/plain, Size: 108 bytes --] gcc/ChangeLog PR c++/69462 * ginclude/float.h: Also provide FLT_EVAL_METHOD and DECIMAL_DIG for C++-11. [-- Attachment #3: 0001-PR-c-69462-Provide-FLT_EVAL_METHOD-and-DECI.patch --] [-- Type: text/x-diff, Size: 945 bytes --] From 3b74be3a03105d608609f35b33bcf2ba43c0b5b9 Mon Sep 17 00:00:00 2001 From: Dominik Vogt <vogt@linux.vnet.ibm.com> Date: Mon, 25 Jan 2016 11:59:06 +0100 Subject: [PATCH] PR c++/69462: Provide FLT_EVAL_METHOD and DECIMAL_DIG in float.h. --- gcc/ginclude/float.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gcc/ginclude/float.h b/gcc/ginclude/float.h index 18f5aac..100e88a 100644 --- a/gcc/ginclude/float.h +++ b/gcc/ginclude/float.h @@ -127,7 +127,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #undef FLT_ROUNDS #define FLT_ROUNDS 1 -#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L +#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) \ + || (defined (__cplusplus) && __cplusplus >= 201103L) /* The floating-point expression evaluation method. -1 indeterminate 0 evaluate all operations and constants just to the range and -- 2.3.0 ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] PR c++/69462: Provide FLT_EVAL_METHOD and DECIMAL_DIG in float.h. 2016-01-28 12:40 [PATCH] PR c++/69462: Provide FLT_EVAL_METHOD and DECIMAL_DIG in float.h Dominik Vogt @ 2016-01-28 13:32 ` Jonathan Wakely 2016-01-28 14:42 ` Jakub Jelinek 2016-01-28 14:41 ` Jakub Jelinek 1 sibling, 1 reply; 8+ messages in thread From: Jonathan Wakely @ 2016-01-28 13:32 UTC (permalink / raw) To: vogt, gcc-patches, Andreas Krebbel 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) ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] PR c++/69462: Provide FLT_EVAL_METHOD and DECIMAL_DIG in float.h. 2016-01-28 13:32 ` Jonathan Wakely @ 2016-01-28 14:42 ` Jakub Jelinek 2016-01-29 12:29 ` Jonathan Wakely 0 siblings, 1 reply; 8+ messages in thread From: Jakub Jelinek @ 2016-01-28 14:42 UTC (permalink / raw) To: Jonathan Wakely; +Cc: vogt, gcc-patches, Andreas Krebbel 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). Jakub ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] PR c++/69462: Provide FLT_EVAL_METHOD and DECIMAL_DIG in float.h. 2016-01-28 14:42 ` Jakub Jelinek @ 2016-01-29 12:29 ` Jonathan Wakely 0 siblings, 0 replies; 8+ messages in thread From: Jonathan Wakely @ 2016-01-29 12:29 UTC (permalink / raw) To: Jakub Jelinek; +Cc: vogt, gcc-patches, Andreas Krebbel [-- Attachment #1: Type: text/plain, Size: 1329 bytes --] 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. [-- Attachment #2: patch.txt --] [-- Type: text/x-patch, Size: 927 bytes --] 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) ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] PR c++/69462: Provide FLT_EVAL_METHOD and DECIMAL_DIG in float.h. 2016-01-28 12:40 [PATCH] PR c++/69462: Provide FLT_EVAL_METHOD and DECIMAL_DIG in float.h Dominik Vogt 2016-01-28 13:32 ` Jonathan Wakely @ 2016-01-28 14:41 ` Jakub Jelinek 2016-01-29 8:27 ` Dominik Vogt 1 sibling, 1 reply; 8+ messages in thread From: Jakub Jelinek @ 2016-01-28 14:41 UTC (permalink / raw) To: vogt, gcc-patches, Andreas Krebbel, Jonathan Wakely On Thu, Jan 28, 2016 at 01:40:12PM +0100, Dominik Vogt wrote: > PR c++/69462 > * ginclude/float.h: Also provide FLT_EVAL_METHOD and DECIMAL_DIG for > C++-11. > >From 3b74be3a03105d608609f35b33bcf2ba43c0b5b9 Mon Sep 17 00:00:00 2001 > From: Dominik Vogt <vogt@linux.vnet.ibm.com> > Date: Mon, 25 Jan 2016 11:59:06 +0100 > Subject: [PATCH] PR c++/69462: Provide FLT_EVAL_METHOD and > DECIMAL_DIG in float.h. > > --- > gcc/ginclude/float.h | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/gcc/ginclude/float.h b/gcc/ginclude/float.h > index 18f5aac..100e88a 100644 > --- a/gcc/ginclude/float.h > +++ b/gcc/ginclude/float.h > @@ -127,7 +127,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see > #undef FLT_ROUNDS > #define FLT_ROUNDS 1 > > -#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L > +#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) \ > + || (defined (__cplusplus) && __cplusplus >= 201103L) The formatting is wrong, there is a tab before || when it should be aligned below defined on the previous line. Ok for trunk with that change. Jakub ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] PR c++/69462: Provide FLT_EVAL_METHOD and DECIMAL_DIG in float.h. 2016-01-28 14:41 ` Jakub Jelinek @ 2016-01-29 8:27 ` Dominik Vogt 2016-01-29 8:32 ` Jakub Jelinek 2016-01-29 10:06 ` Andreas Krebbel 0 siblings, 2 replies; 8+ messages in thread From: Dominik Vogt @ 2016-01-29 8:27 UTC (permalink / raw) To: gcc-patches; +Cc: Jakub Jelinek, Andreas Krebbel, Jonathan Wakely [-- Attachment #1: Type: text/plain, Size: 509 bytes --] On Thu, Jan 28, 2016 at 03:41:29PM +0100, Jakub Jelinek wrote: > On Thu, Jan 28, 2016 at 01:40:12PM +0100, Dominik Vogt wrote: > > -#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L > > +#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) \ > > + || (defined (__cplusplus) && __cplusplus >= 201103L) > > The formatting is wrong, there is a tab before || when it should be aligned > below defined on the previous line. Attached. Ciao Dominik ^_^ ^_^ -- Dominik Vogt IBM Germany [-- Attachment #2: 0001-v2-ChangeLog --] [-- Type: text/plain, Size: 108 bytes --] gcc/ChangeLog PR c++/69462 * ginclude/float.h: Also provide FLT_EVAL_METHOD and DECIMAL_DIG for C++-11. [-- Attachment #3: 0001-v2-PR-c-69462-Provide-FLT_EVAL_METHOD-and-DECI.patch --] [-- Type: text/x-diff, Size: 949 bytes --] From dcaa02429122bd66916caf730b34b0f86d9b1a8f Mon Sep 17 00:00:00 2001 From: Dominik Vogt <vogt@linux.vnet.ibm.com> Date: Mon, 25 Jan 2016 11:59:06 +0100 Subject: [PATCH] PR c++/69462: Provide FLT_EVAL_METHOD and DECIMAL_DIG in float.h. --- gcc/ginclude/float.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gcc/ginclude/float.h b/gcc/ginclude/float.h index 18f5aac..862f7cc 100644 --- a/gcc/ginclude/float.h +++ b/gcc/ginclude/float.h @@ -127,7 +127,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #undef FLT_ROUNDS #define FLT_ROUNDS 1 -#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L +#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) \ + || (defined (__cplusplus) && __cplusplus >= 201103L) /* The floating-point expression evaluation method. -1 indeterminate 0 evaluate all operations and constants just to the range and -- 2.3.0 ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] PR c++/69462: Provide FLT_EVAL_METHOD and DECIMAL_DIG in float.h. 2016-01-29 8:27 ` Dominik Vogt @ 2016-01-29 8:32 ` Jakub Jelinek 2016-01-29 10:06 ` Andreas Krebbel 1 sibling, 0 replies; 8+ messages in thread From: Jakub Jelinek @ 2016-01-29 8:32 UTC (permalink / raw) To: vogt, gcc-patches, Andreas Krebbel, Jonathan Wakely On Fri, Jan 29, 2016 at 09:27:46AM +0100, Dominik Vogt wrote: > On Thu, Jan 28, 2016 at 03:41:29PM +0100, Jakub Jelinek wrote: > > On Thu, Jan 28, 2016 at 01:40:12PM +0100, Dominik Vogt wrote: > > > -#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L > > > +#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) \ > > > + || (defined (__cplusplus) && __cplusplus >= 201103L) > > > > The formatting is wrong, there is a tab before || when it should be aligned > > below defined on the previous line. > > Attached. > gcc/ChangeLog > > PR c++/69462 > * ginclude/float.h: Also provide FLT_EVAL_METHOD and DECIMAL_DIG for > C++-11. Ok, thanks. > --- a/gcc/ginclude/float.h > +++ b/gcc/ginclude/float.h > @@ -127,7 +127,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see > #undef FLT_ROUNDS > #define FLT_ROUNDS 1 > > -#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L > +#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) \ > + || (defined (__cplusplus) && __cplusplus >= 201103L) > /* The floating-point expression evaluation method. > -1 indeterminate > 0 evaluate all operations and constants just to the range and Jakub ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] PR c++/69462: Provide FLT_EVAL_METHOD and DECIMAL_DIG in float.h. 2016-01-29 8:27 ` Dominik Vogt 2016-01-29 8:32 ` Jakub Jelinek @ 2016-01-29 10:06 ` Andreas Krebbel 1 sibling, 0 replies; 8+ messages in thread From: Andreas Krebbel @ 2016-01-29 10:06 UTC (permalink / raw) To: Dominik Vogt; +Cc: gcc-patches On Fri, Jan 29, 2016 at 09:27:46AM +0100, Dominik Vogt wrote: > gcc/ChangeLog > > PR c++/69462 > * ginclude/float.h: Also provide FLT_EVAL_METHOD and DECIMAL_DIG for > C++-11. Applied. Thanks! -Andreas- ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2016-01-29 12:29 UTC | newest] Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2016-01-28 12:40 [PATCH] PR c++/69462: Provide FLT_EVAL_METHOD and DECIMAL_DIG in float.h Dominik Vogt 2016-01-28 13:32 ` Jonathan Wakely 2016-01-28 14:42 ` Jakub Jelinek 2016-01-29 12:29 ` Jonathan Wakely 2016-01-28 14:41 ` Jakub Jelinek 2016-01-29 8:27 ` Dominik Vogt 2016-01-29 8:32 ` Jakub Jelinek 2016-01-29 10:06 ` Andreas Krebbel
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).