<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jun 2, 2015 at 9:24 AM, Amila Jayasekara <span dir="ltr"><<a href="mailto:thejaka.amila@gmail.com" target="_blank">thejaka.amila@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">Hello,<br><br>Inside VarDecl constructor (Decl.cpp L1721 in Clang 3.6) there are 2 static assertions as follows;<br><div><br></div>VarDecl::VarDecl(Kind DK, ASTContext &C, DeclContext *DC,...) {<br><br> static_assert(sizeof(VarDeclBitfields) <= sizeof(unsigned), <br> "VarDeclBitfields too large!"); <div> static_assert(sizeof(ParmVarDeclBitfields) <= sizeof(unsigned),<br> "ParmVarDeclBitfields too large!");</div><div> ...</div><div>}</div><div><br></div><div>I am trying to add an another field to VarDeclBitfields and it triggers second static assertion in above code. </div></div></blockquote><div><br></div><div>I made more room in r237648: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject-3Fview-3Drevision-26revision-3D237648&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=CnzuN65ENJ1H9py9XLiRvC_UQz6u3oG6GUNn7_wosSM&m=YMNn54Uz3cWvBUqUTUJ7SAatdmauinY-qBnm86TGMNU&s=fH5BUhVeW9Ab5Gkrwf-JGcEZ8rOwVaILiOeu_BPyL_s&e=">http://llvm.org/viewvc/llvm-project?view=revision&revision=237648</a></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div><br></div><div>Could you please explain why sizeof VarDeclBitfields and ParmVarDeclBitfields must be less than sizeof(unsigned) and also what are repercussions if I remove above assertions ?</div><div><br></div><div>Thanks</div><div>-Thejaka</div></div>
<br>_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
<br></blockquote></div><br></div></div>