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

type promotion and function overloading change in gcc 3.4...


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


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