[cfe-commits] Patch - Make -Wfour-char-constants only apply to Darwin

Craig Topper craig.topper at gmail.com
Sat Jul 2 23:16:20 PDT 2011


Currently -Wfour-char-constants applies to all OSs. Looking at Apple's
GCC support for -Wfour-char-constant, I think that it gets enabled by
default for all OSs except darwin. Bit difficult to determine since
four-char-constants only exists in Apple's GCC branch. Since this GCC
change seems to be Apple/Darwin specific it seems like clang should
default to warning on 4 character constants on other OSs.

The attached patch checks for Darwin when doing the 4 character check
on character literals. If not Darwin, it will use the Wmultichar
diagnostic four 4 character literals instead.

-- 
~Craig
-------------- next part --------------
A non-text attachment was scrubbed...
Name: four_char_constants.patch
Type: application/octet-stream
Size: 704 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20110702/a1665b9f/attachment.obj>


More information about the cfe-commits mailing list