[cfe-commits] PATCH: Adds -Wenum-compare to Clang

Douglas Gregor dgregor at apple.com
Wed Feb 16 08:28:59 PST 2011


LGTM, thanks!

	- Doug

On Feb 15, 2011, at 11:08 PM, Chandler Carruth wrote:

> John asked on IRC for this to avoid warning on cross-anonymous-enum comparisons, and that made a lot of sense. Done, and a new patch attached.
> 
> On Tue, Feb 15, 2011 at 10:41 PM, Chandler Carruth <chandlerc at google.com> wrote:
> This patch implements most of -Wenum-compare in Clang. I know of at least on difference between this implementation and GCC: this is currently on by default for all languages. In GCC -Wenum-compare is only turned on with -Wall in C/ObjC, but is on by default in C++. I'm happy either leaving as is (and it always being on by default) or if someone has a suggestion for how to model GCC's behavior I'm happy to do that. There may be other differences in the nature of the implementation, I'm not familiar with GCC's.
> 
> <warn_enum_compare.patch>_______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20110216/9b2db5b2/attachment.html>


More information about the cfe-commits mailing list