I'm porting some very old C/C++ code to a C++ app in Xcode 7. I have one source file that contains a very large switch statement (40 cases) in which each case is denoted by a 2-byte constant, and, no surprise, I get a huge list of warnings about using multibyte constants, and I am well aware of the portability issues. The code even has a coping mechanism from long ago:
if LSB
((char*)&code)[1] = sym[0];
((char*)&code)[0] = sym[1];
else
((char*)&code)[0] = sym[0];
((char*)&code)[1] = sym[1];
endif
#endif
switch(code) {
case 'PU':
...etc...
I've spent some time with various ways to use constants or macros to represent the various case values, but nothing is quite as readable as simply keeping the 2-byte constants. Is there any way to tell Xcode to be quiet about that particular message for that particular source file? I still want other warnings, and even multibyte constant warnings in other source files. How can I communicate that to Xcode?