This is the mail archive of the gcc-bugs@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]

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


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


bangerth at dealii dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
          Component|libstdc++                   |c++
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2003-07-02 16:24:22
               date|                            |
            Summary|26_numerics/fabs_inline.cc  |[3.3/3.4 regression] using
                   |failure                     |declarations and fabs built-
                   |                            |in


------- Additional Comments From bangerth at dealii dot org  2003-07-02 16:24 -------
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)


I don't think the call is ambiguous, so it should succeed. I believe that it
must have something to do with built-ins because it succeeds if fabs is
renamed to something else.

W.


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