[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gcc
Subject:    type promotion and function overloading change in gcc 3.4...
From:       Fons Rademakers <Fons.Rademakers () cern ! ch>
Date:       2003-08-22 15:07:18
[Download RAW message or body]

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
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic