[Bug c++/18838] New: overload resolution depends on previous uses of the symbol
rth at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Sun Dec 5 00:50:00 GMT 2004
The following is a reduced form of 26_numerics/cmath/fabs_inline.cc
which has failed for a very long time on Alpha, but doesn't fail on
other platforms and so isn't getting fixed.
The problem is that Alpha's headers have an inline version of floor
which uses fabs. This usage isn't present on other systems. Which
leads to the following reduced test case
--------------------------------------------------------
extern "C" {
extern double fabs (double __x) throw () __attribute__ ((__const__));
__inline double
fabs (double __x) throw () { return __builtin_fabs (__x); }
}
double fail_me(double __x) { return fabs(__x); }
namespace std
{
using ::fabs;
}
typedef double (*realfn) (double);
using std::fabs;
int main ()
{
realfn myfn = fabs;
}
--------------------------------------------------------
which will pass if fail_me is commented out.
--
Summary: overload resolution depends on previous uses of the
symbol
Product: gcc
Version: 3.3.5
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: rth at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18838
More information about the Gcc-bugs
mailing list