Warning “Use of GNU statement expression extension”

后端 未结 4 1553
谎友^
谎友^ 2021-01-04 11:09

I have this Objective-C istruction:

NSRange range = NSMakeRange(i, MIN(a, b));

where a and bare NSUInteger<

4条回答
  •  攒了一身酷
    2021-01-04 11:31

    It’s a late answer, I know, but you can avoid this message by adding -Wno-gnu to your compiler flags.

    (In Xcode 5 I believe you can change this by going to your project’s Build Settings and adding -Wno-gnu to the “Other C Flags”, which are in the “Apple LLVM 5.0 – Custom Compiler Flags” section.)

提交回复
热议问题