Xcode 9 beta - 'possible misuse of comma operator' warnings


#1

I’m trying out the Xcode 9 beta with my JUCE project in an evaluation partition, since - at last - XCode 9 gives us refactoring for C++ and hopefully will avoid me having to move to CLion or AppCode.
All good - builds fine but getting quite a lot of possible misuse of comma operator warnings in many third party library c files such as trees.c and many zlib files.

Is this being dealt with ?

turning off the “Suspicious commas” Build settings warnings option under LLVM Warnings helped remove a lot of the warnings but not ll of them.


#2

Haven’t tried Xcode 9 yet, but we’ll be doing that soon!


#3

Be warned - current beta ( 3 ) has a habit of reporting in red, syntax/compile errors which in fact don’t exist.

One has to often save the source file in question again and wait before the false error-highlights etc disappear.


#4

By the sounds of it, it’s catching up with Visual Studio’s Shittellisense!


#5

The issue still exists. I tried to use the Extra Compiler flags to silence the comma warnings, but they are only used for C++ and ignored for C code.


#6

I’ve been using Xcode 9, but the only “misuse of comma” warning I’ve seen is inside Steinberg’s VST SDK code. Is that what you’re talking about?

(FWIW to silence it, I just hacked the copy of that Steinberg file on my local machine)


#7

I tried this additionally:

https://github.com/steinbergmedia/vst3_public_sdk/pull/2

But I don’t expect it to happen :wink:


#8

I have it in a version of zlib and in lua 5.3.4.

I tried to get rid of the warning by adding -Wno-comma to the Extra Compiler Flags, but that only sets the flags for C++. And it is ignored by the Xcode project generator, which adds that warning regardless.


#9

Bump? I’m getting almost a hundred warnings from the pnglib source files.


#10

The trick is to do the inverse of what Projucer does: add CLANG_WARN_COMMA = NO to the “Custom Xcode Flags” field in Projucer.


#11

This should be fixed on the develop branch.