materi added a comment.
Hi!
After this patch I started to see warnings:
e.c:8:23: warning: integer constant not in range of enumerated type 'enum E'
[-Wassign-enum]
enum E {a = 7,} e = 1000;
^
e.c:10:12: warning: comparison 'enum E' > 7 is always false
[-Wtautological-constant-compare]
return e > 7;
Isn't the the "always false" message misleading? It's only "always false" if e
was initialized with an in-range value. Maybe the tautology check should be on
the enum's underlying type instead?
Repository:
rL LLVM
https://reviews.llvm.org/D38101
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits