hubert.reinterpretcast added inline comments.
================
Comment at: lib/Sema/SemaDecl.cpp:12586
@@ -12585,3 +12585,3 @@
if (!FieldTy->isDependentType()) {
uint64_t TypeSize = Context.getTypeSize(FieldTy);
if (Value.getZExtValue() > TypeSize) {
----------------
rsmith wrote:
> I think the right way to fix this is to call `getIntWidth` here instead of
> `getTypeSize`, and finesse our error message to clarify that we're talking
> about the width of the type (the number of value bits) rather than the size
> of the type (the number of storage bits).
The implementation of `getIntWidth` currently makes this consideration moot at
this time, but should this extend to C89 (aside from the `_Bool` extension)?
http://reviews.llvm.org/D10018
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits