• 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: ZeroLink: Perhaps better disabled per default?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ZeroLink: Perhaps better disabled per default?


  • Subject: Re: ZeroLink: Perhaps better disabled per default?
  • From: Andreas Grosam <email@hidden>
  • Date: Fri, 14 Oct 2005 19:14:04 +0200


On 14.10.2005, at 18:01, David Hoerl wrote:

...
While I fully agree with  j o a r,  I would like to mention, that this
code snippet will compile without errors:

extern void bar();		// prototype

void foo()  {
	boar();  	// typo
}

Don't expect errors when compiling with a C compiler. It even will not complain when the -pedantic or -Wmissing-prototypes flags are on.
This is because it is completely valid and legal code.
Sure, it won't link.


To get rid of it: - use C++

Regards
Andreas Grosam

Add the above to your "Other CFlags" options:

-Wimplicit -Wmissing-prototypes -Wstrict-prototypes

The implicit flag above provides a warning on a usage without a prototype.

Ah, thanks for the hint. -Wall enables these, too. IMO, for C the aformentioned three flags should be on per default.

found also these specific warning and error flags which will mark the function call boar():
-Wimplicit-function-declaration
-Werror-implicit-function-declaration


Unfortunately, there is no Warning build-setting in XCode for these two above.




David


_______________________________________________ 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: 
 >Re: ZeroLink: Perhaps better disabled per default? (From: David Hoerl <email@hidden>)

  • Prev by Date: Re: ZeroLink: Perhaps better disabled per default?
  • Next by Date: 10.2.8 SDK won't compile <Carbon/Carbon.h>
  • Previous by thread: Re: ZeroLink: Perhaps better disabled per default?
  • Next by thread: Easier/faster way adding different localization (nibs) ?
  • Index(es):
    • Date
    • Thread