• 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: Jens Ayton <email@hidden>
  • Date: Tue, 22 Sep 2009 20:30:31 +0200

On Sep 22, 2009, at 20:26, Jens Alfke wrote:
On Sep 22, 2009, at 11:03 AM, Steve Mills wrote:

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'

This is declaring a function parameter of type 'void'. That doesn't seem legal to me.

It's perfectly valid (and normal):

void foo(); // function with unspecified arguments in C, no arguments in C++
void bar(void); // function with no arguments


I don't know whether it's valid to do it via a typedef, though. Clearly 4.2 doesn't think so.


-- Jens Ayton

_______________________________________________
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


References: 
 >gcc 4.2 generates error that was OK before (From: Steve Mills <email@hidden>)
 >Re: gcc 4.2 generates error that was OK before (From: Jens Alfke <email@hidden>)

  • Prev by Date: Re: gcc 4.2 generates error that was OK before
  • Next by Date: Re: Missing Debugger Text Editor
  • 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