Even More Compiler Flags
gcc has always had a lot of command-line flags that can control many aspects of the compiler, such as the dialect of the language being compiled, the manipulations performed on the resulting object code, and controlling what warnings are emitted.
In Xcode, you can pass these flags to the compiler by setting the Other C Flags (for optimization and other general flags) and Other Warning Flags (for flags related to warnings) in the target inspector. The warning flags are placed before the other C flags in case there is an order dependency between a set of flags.
Here are some flags that might be of interest to you:
- -Wno-protocol
This flag makes Objective-C’s @protocol feature more useful in some circumstances. The default ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access