This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re:Re:FRIEND_CLASS_TYPEDEF
- From: Eus <eus at member dot fsf dot org>
- To: Kalugsky Uriy <urik at kiam1 dot rssi dot ru>
- Cc: GCC Help Mailing List <gcc-help at gcc dot gnu dot org>
- Date: Fri, 20 Jun 2008 01:13:14 -0700 (PDT)
- Subject: Re:Re:FRIEND_CLASS_TYPEDEF
- Reply-to: eus at member dot fsf dot org
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