• 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: Old C Code problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Old C Code problem


  • Subject: Re: Old C Code problem
  • From: Rob Crawford <email@hidden>
  • Date: Wed, 7 Dec 2005 14:44:58 -0500

Yes it does compile, thanks, I need to force the c compile on it.

thanks,
rob

On Dec 7, 2005, at 1:31 PM, Eric Albert wrote:

On Dec 7, 2005, at 9:08 AM, Rob Crawford wrote:

I have a lot of code that was written many many years ago. And follows an old C way of defining functions.

ext:
	void foo(a,b)
		long a;
		long b;
{
	// implumentation
}

I know I should change all these function to a more current way but it would take quite a while and if it can be avoided it would help. Is there anyway to allow XCode/gcc to allow this notation?

Yes...this should work fine in C code. In a quick test I couldn't get it to compile in C++, but it worked in C and Objective C. I suspect the K&R syntax isn't supported in C++ because C++ wasn't created until C already had switched away from K&R syntax, but I might be wrong about that.


Hope this helps,
Eric


_______________________________________________ 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: 
 >Old C Code problem (From: Rob Crawford <email@hidden>)
 >Re: Old C Code problem (From: Eric Albert <email@hidden>)

  • Prev by Date: Executable extension is ignored?
  • Next by Date: Linking object codes
  • Previous by thread: Re: Old C Code problem
  • Next by thread: Executable extension is ignored?
  • Index(es):
    • Date
    • Thread