This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
type promotion and function overloading change in gcc 3.4...
- From: Fons Rademakers <Fons dot Rademakers at cern dot ch>
- To: gcc at gcc dot gnu dot org
- Date: 22 Aug 2003 17:07:18 +0200
- Subject: type promotion and function overloading change in gcc 3.4...
- Organization: CERN
Hi,
I notice that in the current snapshot of gcc 3.4 the following
generates an error:
class A {
public:
void Func(long l);
void Func(double d);
...
};
void bla()
{
float f = 9.9;
A a;
a.Func(f);
}
is this expected? Is the type promotion from float to double not anymore
favored over the standard conversion from float to long?
Cheers, Fons.
--
Org: CERN, European Laboratory for Particle Physics.
Mail: 1211 Geneve 23, Switzerland
E-Mail: Fons.Rademakers@cern.ch Phone: +41 22 7679248
WWW: http://root.cern.ch/~rdm/ Fax: +41 22 7679480