[Bug c++/11409] [3.3/3.4 regression] using declarations and fabs built-in

gdr at integrable-solutions dot net gcc-bugzilla@gcc.gnu.org
Fri Jul 4 12:02:00 GMT 2003


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11409



------- Additional Comments From gdr at integrable-solutions dot net  2003-07-04 12:02 -------
Subject: Re:  [3.3/3.4 regression] using declarations and fabs built-in

"bangerth at dealii dot org" <gcc-bugzilla@gcc.gnu.org> writes:

| Here's the requested C++-fu:
| This is a problem in the C++ front end with built-ins and using
| declarations. Here's a smaller testcase:
| -----------------------------
| namespace std {
|   double fabs (double);
| }
| using std::fabs;
| 
| double (*p) (double) = &fabs;
| -----------------------------
| 
| We can compile this with 3.2.3, but 3.3 and 3.4 fail like so:
| g/x> /home/bangerth/bin/gcc-3.3-pre/bin/c++ -c y.cc
| y.cc:6: error: converting overloaded function `fabs' to type `double
|    (*)(double)' is ambiguous
| <internal>:6: error: candidates are: double fabs(double)
| y.cc:2: error:                 double std::fabs(double)

Yeah, this is a bug in handling the built-ins.  Roger might have
something to say on that.


This is a hot regression.

-- Gaby



More information about the Gcc-bugs mailing list