• 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: turning a specific warning into an error
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: turning a specific warning into an error


  • Subject: Re: turning a specific warning into an error
  • From: Jim Wintermyre <email@hidden>
  • Date: Thu, 22 Mar 2007 13:01:02 -0700

On 3/22/07, Stefan Werner <email@hidden> wrote:
 Hi,

 I know there are gcc flags that can turn all warnings into errors.
 However, what I'm looking for right now is something to turn a
 specific warning into an error while leaving other warnings alone:

 warning: cannot pass objects of non-POD type 'class MyClass' through
 '...'; call will abort at runtime

 Translation: "I have no idea what to do, but I'll compile it anyway."
 IMHO this really should be an error and not a warning - is there any
 way to get this behavior?

I asked about this once before and never got an answer. If you are looking to fix all of the current warnings you have for this, then do a full build after cleaning, select the Errors & Warnings group in the project window (I'm using the default layout), then use the Search field to filter the warnings. I don't know of a way to guard against adding this type of code in the future by elevating it to an error.

I had this "warning" turn up in a kext. In that case, "abort at runtime" translates to "panic the system". :) Wasted a good day or two finding that one. This was way back in the Project Builder days, and I had since all but forgotten about it. Then when I was working on Universal Binary conversion, at some point someone else re-enabled the code that was crashing (ironically, it was just a debug printf that was passing a non-POD type as one of the varargs!). This "warning" was lost in the morass of other warnings, which yes I legitimately need to clean up, but that was lower priority than just getting the Intel build working... so I spent another good day or two tracking down the same bug.


Jim
_______________________________________________
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


  • Prev by Date: Re: turning a specific warning into an error
  • Next by Date: Controlling Shark from my application?
  • Previous by thread: Re: turning a specific warning into an error
  • Next by thread: Controlling Shark from my application?
  • Index(es):
    • Date
    • Thread