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: [google] Merge r173574 to google/gcc-4_6 to fix an incompatibility between C++98 and C++0x (issue4592057)


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?


Diego.


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