[google] Merge r173574 to google/gcc-4_6 to fix an incompatibility between C++98 and C++0x (issue4592057)

Jeffrey Yasskin jyasskin@google.com
Tue Jun 14 20:13:00 GMT 2011


On Tue, Jun 14, 2011 at 12:38 PM, Diego Novillo <dnovillo@google.com> wrote:
> On Tue, Jun 14, 2011 at 14:45, Jeffrey Yasskin <jyasskin@google.com> wrote:
>> In C++0x mode, without this patch, calls to a user-defined trunc() function with an argument in namespace std and
>> a parameter type that has an implicit conversion from the argument's type, cause infinite recursion in std::trunc().
>>
>> This patch also includes http://gcc.gnu.org/viewcvs/trunk/libstdc%2B%2B-v3/testsuite/26_numerics/headers/cmath/overloads_c%2B%2B0x_neg.cc?view=markup&pathrev=173574 and http://gcc.gnu.org/viewcvs/trunk/libstdc%2B%2B-v3/testsuite/tr1/8_c_compatibility/cmath/overloads_neg.cc?view=markup&pathrev=173574, but `svn diff` didn't capture them.
>
> Yeah, svn diff never picks up added files.  Silly thing.
>
>>
>> Tested with `make check-c++` on x86_64-unknown-linux-gnu.
>>
>> 2011-06-14  Jeffrey Yasskin  <jyasskin@google.com>
>>
>>        Merge r173574 to google/gcc-4_6.
>>        * include/c_global/cmath (acosh, asinh, atanh, cbrt, copysign,
>>        erf, erfc, exp2, expm1, fdim, fma, fmax, hypot, ilogb, lgamma,
>>        llrint, llround, log1p, log2, logb, lrint, lround, nearbyint,
>>        nextafter, nexttoward, remainder, remquo, rint, round, scalbln,
>>        scalbn, tgamma, trunc): Use __enable_if on the return type.
>>        * include/tr1/cmath: Likewise.
>>        * testsuite/26_numerics/headers/cmath/overloads_c++0x_neg.cc: New.
>>        * testsuite/tr1/8_c_compatibility/cmath/overloads_neg.cc: Likewise.
>>
>
> Any reason not to put this in google/main?

It's already in trunk, so my impression was that it was going to be
automatically merged to google/main. I only need a manual merge to get
it into our release branches.

Jeffrey



More information about the Gcc-patches mailing list