• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: gcc 4.2 generates error that was OK before
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gcc 4.2 generates error that was OK before


  • Subject: Re: gcc 4.2 generates error that was OK before
  • From: Alastair Houghton <email@hidden>
  • Date: Tue, 22 Sep 2009 20:32:01 +0100


On 22 Sep 2009, at 19:03, Steve Mills wrote:

One of our 3rd party libs has these lines:

typedef void hsNewHandler_ReturnType;
typedef void hsNewHandler_ParamType;
static hsNewHandler_ReturnType hsGGlyphCacheHandler (hsNewHandler_ParamType);


This generates these errors when using gcc 4.2 instead of 4.0:

error: '<anonymous>' has incomplete type
error: invalid use of 'hsNewHandler_ParamType'

Are you compiling this in (ObjC-)C++, perchance?

I ask because the C++ language syntax has all kinds of problems thanks to the thoughtless way its grammar was extended (no, I do not worship Stroustrup, unlike---apparently---half the developer community). It may be that the compiler is for some reason treating your function declaration as a declaration of a variable with an initialiser and then barfing.

If that *is* the cause of the problem, I wouldn't be entirely surprised to discover that the standard mandates it. It often seems to come up with---on the face of things unreasonable---meanings for things, but if you read it carefully you can usually see why it was decided that way.

Kind regards,

Alastair.

--
http://alastairs-place.net



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: gcc 4.2 generates error that was OK before
      • From: Rippit the Ogg Frog <email@hidden>
    • Re: gcc 4.2 generates error that was OK before
      • From: Steve Mills <email@hidden>
References: 
 >gcc 4.2 generates error that was OK before (From: Steve Mills <email@hidden>)

  • Prev by Date: Re: gcc 4.2 generates error that was OK before
  • Next by Date: Re: gcc 4.2 generates error that was OK before
  • Previous by thread: Re: gcc 4.2 generates error that was OK before
  • Next by thread: Re: gcc 4.2 generates error that was OK before
  • Index(es):
    • Date
    • Thread