* warning when hiding methods
@ 2005-05-16 10:56 Philippe Haution
2005-05-16 13:51 ` Nathan Sidwell
0 siblings, 1 reply; 3+ messages in thread
From: Philippe Haution @ 2005-05-16 10:56 UTC (permalink / raw)
To: gcc-help
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: warning when hiding methods
2005-05-16 10:56 warning when hiding methods Philippe Haution
@ 2005-05-16 13:51 ` Nathan Sidwell
0 siblings, 0 replies; 3+ messages in thread
From: Nathan Sidwell @ 2005-05-16 13:51 UTC (permalink / raw)
To: philippe.haution; +Cc: gcc-help
Philippe Haution wrote:
> 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)."
-Woverloaded-virtual
nathan
--
Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery LLC
nathan@codesourcery.com :: http://www.planetfall.pwp.blueyonder.co.uk
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: warning when hiding methods
@ 2005-05-16 17:31 Philippe Haution
0 siblings, 0 replies; 3+ messages in thread
From: Philippe Haution @ 2005-05-16 17:31 UTC (permalink / raw)
To: Nathan Sidwell; +Cc: gcc-help
Thank you, that's exactly what I was looking for.
PH
--- Nathan Sidwell <nathan@codesourcery.com> a écrit:
> Philippe Haution wrote:
> > 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)."
>
> -Woverloaded-virtual
>
> nathan
> --
> Nathan Sidwell :: http://www.codesourcery.com
> :: CodeSourcery LLC
> nathan@codesourcery.com ::
> http://www.planetfall.pwp.blueyonder.co.uk
>
>
_____________________________________________________________________________
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-05-16 17:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-05-16 10:56 warning when hiding methods Philippe Haution
2005-05-16 13:51 ` Nathan Sidwell
2005-05-16 17:31 Philippe Haution
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).