FRIEND_CLASS_TYPEDEF

Eus eus@member.fsf.org
Fri Jun 20 08:13:00 GMT 2008


Hi Ho!

--- On Thu, 6/19/08, Kalugsky Uriy <urik@kiam1.rssi.ru> wrote:

> From: Kalugsky Uriy <urik@kiam1.rssi.ru>
> Subject: Re:Re:FRIEND_CLASS_TYPEDEF
> To: eus@member.fsf.org
> Date: Thursday, June 19, 2008, 9:29 PM
> Hello,
> 
> I think there is a GCC parser error.
> 
> It is rather clearly why the GCC parser doesn't like
> the phrase 'class TYPEDEFED_A'
> if 'TYPEDEFED_A' is a type defined with
> 'typedef'.
> The parser considers 'typedefed' types as types
> which were defined previously.
> But the phrase 'friend class TYPEDEFED_A'
> doesn't define a new type and I think
> the parser doesn't take in account the word
> 'friend'.

Yes, it is likely so.
I wonder what the GCC maintainers will say about this.
Will they add a new grammar rule with regard to this?
Well, we'll see.

> I needed to port a huge project from GCC2.96 to GCC4.1.0.
> I changed 'typedefs' to '#defines'.
> It is a very unaesthetical way but it is the cheapest one.

Yup! You are right! :)

> Best regards,
> Yuri

Best regards,
Eus


      



More information about the Gcc-help mailing list