This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Namespace of function (CTOR) parameters
- To: umberto dot puxeddu at tiscalinet dot it
- Subject: Re: Namespace of function (CTOR) parameters
- From: "Martin v. Loewis" <martin at mira dot isdn dot cs dot tu-berlin dot de>
- Date: Mon, 26 Jul 1999 21:11:24 +0200
- CC: gcc at gcc dot gnu dot org
- References: <199907261059.MAA22757@crux.tiscalinet.it>
> My user has egcs-2.90.27 and he gets the errors above at link time but
> no errors from the compiler. I requested the output of 'nm' and from the
> signature of the function I can see that MY compiler understands what I
> mean (PitchQuantizer::Smoothmode) even without specifying the namespace.
No, your compiler is right; in a method (or constructor) definition,
you are in the scope of the class. The scope of the class starts as
soon as the class name is seen.
> Of course this may not be a good thing, but it does. The OTHER
> compiler does the right thing: it doesn't apply the function name's
> namespace to the parameters. The problem is that it doesn't
> complain.
The compiler should use all parameter types in the type safe linkage.
This is clearly a bug in egcs 1.0. Please try
typedef enum Smoothmode{STRONG, WEAK};
as you don't need the typedef.
Regards,
Martin