warning when hiding methods

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

The program hereafter compiles silently with gcc3.2.3
and gcc 3.4.1 although there is a name hinding
problem.

Is there a compile option to get the same sort of
warning that Sun's CC would emit in this case :
"Warning: Son::func hides the virtual function
Mother::func(float)."
?

Regards,

PH

class Mother
{
  public:
    virtual void func(float b)
    {}
};

class Son : public Mother
{
  public:
    void func(int a, float b)
    {}
}; 

int main()
{
  return 0;
}


	

	
		
_____________________________________________________________________________ 
Découvrez le nouveau Yahoo! Mail : 1 Go d'espace de stockage pour vos mails, photos et vidéos ! 
Créez votre Yahoo! Mail sur http://fr.mail.yahoo.com

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux