diff mbox

[fixincludes] solaris_pow_int_overload should use __cplusplus

Message ID yddvc6jxcry.fsf@lokon.CeBiTec.Uni-Bielefeld.DE
State New
Headers show

Commit Message

Rainer Orth May 16, 2013, 1:41 p.m. UTC
Work is going on to incorporate all applicable fixincludes fixes into
the Solaris headers proper.  One fix is currently problematic since it
uses an G++-internal macro (__GXX_EXPERIMENTAL_CXX0X__) where libstdc++
<cmath> already switched to testing __cplusplus.  The following patch
updates the fix to match <cmath>.

Tested by mainline bootstraps on i386-pc-solaris2.11,
sparc-sun-solaris2.11 and 4.8 bootstrap on i386-pc-solaris2.10.

Ok for mainline and 4.8 branch if they pass?

Thanks.
	Rainer


2013-05-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	* inclhack.def (solaris_pow_int_overload): Update comment.
	Change guard to match <cmath>.
	* fixincl.x: Regenerate.
	* tests/base/iso/math_iso.h [SOLARIS_POW_INT_OVERLOAD_CHECK]:
	Matching change.

Comments

Gabriel Dos Reis May 16, 2013, 2:39 p.m. UTC | #1
On Thu, May 16, 2013 at 8:41 AM, Rainer Orth
<ro@cebitec.uni-bielefeld.de> wrote:
> Work is going on to incorporate all applicable fixincludes fixes into
> the Solaris headers proper.  One fix is currently problematic since it
> uses an G++-internal macro (__GXX_EXPERIMENTAL_CXX0X__) where libstdc++
> <cmath> already switched to testing __cplusplus.  The following patch
> updates the fix to match <cmath>.
>
> Tested by mainline bootstraps on i386-pc-solaris2.11,
> sparc-sun-solaris2.11 and 4.8 bootstrap on i386-pc-solaris2.10.
>
> Ok for mainline and 4.8 branch if they pass?
>
> Thanks.
>         Rainer

Ok with me if it is OK with Bruce.


>
>
> 2013-05-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
>
>         * inclhack.def (solaris_pow_int_overload): Update comment.
>         Change guard to match <cmath>.
>         * fixincl.x: Regenerate.
>         * tests/base/iso/math_iso.h [SOLARIS_POW_INT_OVERLOAD_CHECK]:
>         Matching change.
>
>
>
> --
> -----------------------------------------------------------------------------
> Rainer Orth, Center for Biotechnology, Bielefeld University
>
Bruce Korb May 16, 2013, 3:21 p.m. UTC | #2
On 05/16/13 06:41, Rainer Orth wrote:
> Work is going on to incorporate all applicable fixincludes fixes into
> the Solaris headers proper.  One fix is currently problematic since it
> uses an G++-internal macro (__GXX_EXPERIMENTAL_CXX0X__) where libstdc++
> <cmath> already switched to testing __cplusplus.  The following patch
> updates the fix to match <cmath>.
>
> Tested by mainline bootstraps on i386-pc-solaris2.11,
> sparc-sun-solaris2.11 and 4.8 bootstrap on i386-pc-solaris2.10.
>
> Ok for mainline and 4.8 branch if they pass?

Look good to me.  Thanks.
Rainer Orth May 17, 2013, 8:40 a.m. UTC | #3
Bruce Korb <bkorb@gnu.org> writes:

> On 05/16/13 06:41, Rainer Orth wrote:
>> Work is going on to incorporate all applicable fixincludes fixes into
>> the Solaris headers proper.  One fix is currently problematic since it
>> uses an G++-internal macro (__GXX_EXPERIMENTAL_CXX0X__) where libstdc++
>> <cmath> already switched to testing __cplusplus.  The following patch
>> updates the fix to match <cmath>.
>>
>> Tested by mainline bootstraps on i386-pc-solaris2.11,
>> sparc-sun-solaris2.11 and 4.8 bootstrap on i386-pc-solaris2.10.
>>
>> Ok for mainline and 4.8 branch if they pass?
>
> Look good to me.  Thanks.

Testing completed successfully now on both 4.8 branch and mainline, thus
I've installed the patch on mainline.

Jakub, may I install on the 4.8 branch now or better wait until 4.8.1 is
released?

Thanks.
        Rainer
Rainer Orth May 31, 2013, 11:35 a.m. UTC | #4
Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> writes:

> Bruce Korb <bkorb@gnu.org> writes:
>
>> On 05/16/13 06:41, Rainer Orth wrote:
>>> Work is going on to incorporate all applicable fixincludes fixes into
>>> the Solaris headers proper.  One fix is currently problematic since it
>>> uses an G++-internal macro (__GXX_EXPERIMENTAL_CXX0X__) where libstdc++
>>> <cmath> already switched to testing __cplusplus.  The following patch
>>> updates the fix to match <cmath>.
>>>
>>> Tested by mainline bootstraps on i386-pc-solaris2.11,
>>> sparc-sun-solaris2.11 and 4.8 bootstrap on i386-pc-solaris2.10.
>>>
>>> Ok for mainline and 4.8 branch if they pass?
>>
>> Look good to me.  Thanks.
>
> Testing completed successfully now on both 4.8 branch and mainline, thus
> I've installed the patch on mainline.
>
> Jakub, may I install on the 4.8 branch now or better wait until 4.8.1 is
> released?

Jakub, with the release of 4.8.1, is the patch ok for the 4.8 branch
now?

Thanks.
        Rainer
Jakub Jelinek May 31, 2013, 11:38 a.m. UTC | #5
On Fri, May 31, 2013 at 01:35:14PM +0200, Rainer Orth wrote:
> Jakub, with the release of 4.8.1, is the patch ok for the 4.8 branch
> now?

Ok.

	Jakub
diff mbox

Patch

# HG changeset patch
# Parent c4272fed2b181caf1d8a82b6c0c727d0371c4f18
solaris_pow_int_overload should use __cplusplus

diff --git a/fixincludes/inclhack.def b/fixincludes/inclhack.def
--- a/fixincludes/inclhack.def
+++ b/fixincludes/inclhack.def
@@ -3474,7 +3474,7 @@  fix = {
 
 
 /*
- *  The pow overloads with int were removed in C++ 2011.
+ *  The pow overloads with int were removed in C++ 2011 DR 550.
  */
 fix = {
     hackname  = solaris_pow_int_overload;
@@ -3483,7 +3483,7 @@  fix = {
     select    = "^[ \t]*inline [a-z ]* pow\\([^()]*, int [^()]*\\)"
 		" *\\{[^{}]*\n[^{}]*\\}";
     c_fix     = format;
-    c_fix_arg = "#ifndef __GXX_EXPERIMENTAL_CXX0X__\n%0\n#endif";
+    c_fix_arg = "#if __cplusplus < 201103L\n%0\n#endif";
 
     test_text =
     "	inline long double pow(long double __X, int __Y) { return\n"
diff --git a/fixincludes/tests/base/iso/math_iso.h b/fixincludes/tests/base/iso/math_iso.h
--- a/fixincludes/tests/base/iso/math_iso.h
+++ b/fixincludes/tests/base/iso/math_iso.h
@@ -10,7 +10,7 @@ 
 
 
 #if defined( SOLARIS_POW_INT_OVERLOAD_CHECK )
-#ifndef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus < 201103L
 	inline long double pow(long double __X, int __Y) { return
 		__powl(__X, (long double) (__Y)); }
 #endif