This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/37276] New: Trouble with some (C99?) math builtins and namespace std
- From: "paolo dot carlini at oracle dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 29 Aug 2008 12:53:17 -0000
- Subject: [Bug c++/37276] New: Trouble with some (C99?) math builtins and namespace std
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Hi, I'm getting this annoying run-time Seg-fault for the below. Apparently,
isn't a regression, but really, if we could fix it, the C++ library would
benefit a lot from the fix!
////////////////
namespace my_std
{
inline double
atan(double __x)
{ return __builtin_atan(__x); }
inline double
atanh(double __x)
{ return __builtin_atanh(__x); }
}
namespace std
{
inline double
atan(double __x)
{ return __builtin_atan(__x); }
inline double
atanh(double __x)
{ return __builtin_atanh(__x); }
}
int main()
{
double d;
my_std::atan(.3); // works
my_std::atanh(.3); // works
std::atan(.3); // works
std::atanh(.3); // seg-faults at run-time
}
--
Summary: Trouble with some (C99?) math builtins and namespace std
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: paolo dot carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37276