Wednesday, June 18, 2014

Which Clang Warning Is Generating This Message?

Mattt Thompson:

The problem is that given a warning string, it is very difficult to determine what its corresponding warning flag is. Unless a random Stack Overflow question pops up for the given error string, you're pretty much out of luck.

So this week, as a public service, we've compiled a (mostly) comprehensive list of Clang warning strings and their associated flags[…]

The list is also available at an easy-to-remember domain name.

2 Comments

Maybe I am missing something, but Xcode tells you the warning flag for any given warning. Its not displayed in Xcode's overview, but if you go to the text of the error, it shows the flag that is responsible, eg:

error: 'kCFStreamSSLAllowsAnyRoot' is deprecated: first deprecated in OS X 10.6 [-Werror,-Wdeprecated-declarations]

@Peter Cédric Luthi pointed that out as well. I’m not sure what the deal is here. I definitely have seen the warning flags in the build log, but I have also (recently) had warnings where the flag wasn’t shown, and I had to go to the Clang source to see how to suppress them.

Stay up-to-date by subscribing to the Comments RSS Feed for this post.

Leave a Comment