[Webkit-unassigned] [Bug 59249] Colliding isinf/isnan between C99 and C++0x with GCC 4.6.0
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Apr 22 23:19:22 PDT 2011
https://bugs.webkit.org/show_bug.cgi?id=59249
--- Comment #6 from Xan Lopez <xan.lopez at gmail.com> 2011-04-22 23:19:22 PST ---
(In reply to comment #5)
> (From update of attachment 90792 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=90792&action=review
>
> > Source/JavaScriptCore/ChangeLog:9
> > + Don't use "using namespace std;" in files where isnan or isinf are
> > + used, since it can lead to ambiguity in C++0x compilers. See the
>
> This is not a very maintainable rule, and following it makes the code base less consistent. I hope that there is a better solution.
I can't really think of any, but there might be. My proposed long-term solution of getting rid of math.h and always using std:: in front of the functions also requires not to use "using namespace std;", at least in the files where isnan/isinf are called, so it wouldn't be a huge improvement in that regard, I suppose.
>
> Is this a gcc bug, or expected behavior?
The spec, AFAICU, leaves undefined whether or not the functions are also present in the global namespace (on top of being in std::), so I don't think it's a bug but just the way it happens to be on GCC. For details see section 17.6.1.2 (4) of http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3092.pdf
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list