• 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
-Wunreachable-code borked?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

-Wunreachable-code borked?


  • Subject: -Wunreachable-code borked?
  • From: j o a r <email@hidden>
  • Date: Wed, 26 Nov 2003 14:50:14 +0100

We tried to enable the "-Wunreachable-code" warning flag, but it seems
to generate a _lot_ of false warnings when compiling ObjC code at -O3.
Is this a known problem?

Two examples:

========================================
1         if( [compDepths count] == 0 )
2             return;	// Bugfix for having depth open for a basket
being created
3         for( i = 0 ; i < [compDepths count] ; i++ )
4         {
5             comboComp = [comboComponents objectAtIndex:i];
========================================

Generates the warning:
some/file.m:5: warning: will never be executed

and:

========================================
1 - (int) timeCreated
2 {
3	if (timeCreated == 0)
4 		return [NSDate getCurrentTime];
5
6 	return timeCreated;
7 }
========================================

Generates the warning:
some/file.m:6: warning: will never be executed

j o a r

[demime 0.98b removed an attachment of type application/pkcs7-signature which had a name of smime.p7s]
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: Suppressing warnings for multi-character character constants
  • Next by Date: Re: CVS integration XCode
  • Previous by thread: Indirectly linked user dylibs
  • Next by thread: Install on Panther.
  • Index(es):
    • Date
    • Thread