• 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: Eric Albert <email@hidden>
  • Date: Wed, 7 Dec 2005 10:31:15 -0800

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


  • Follow-Ups:
    • Re: Old C Code problem
      • From: Rob Crawford <email@hidden>
References: 
 >Old C Code problem (From: Rob Crawford <email@hidden>)

  • Prev by Date: Re: Custom build products location
  • Next by Date: Executable extension is ignored?
  • Previous by thread: Old C Code problem
  • Next by thread: Re: Old C Code problem
  • Index(es):
    • Date
    • Thread