<div dir="ltr">Thank you Reid and David.<div><br></div><div>I will probably use David's approach in my code (3.6 based) and incorporate new bit fields.</div><div><br></div><div>Regards</div><div>-Thejaka</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jun 4, 2015 at 8:31 PM, David Majnemer <span dir="ltr"><<a href="mailto:david.majnemer@gmail.com" target="_blank">david.majnemer@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><span class="">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></span><span class=""><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></span><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=HjxpVwQrc95eA4gbud2UOIBCqFVSVxTAV6Rogl0ZC5k&s=5zyErXB6dc6FlgcU3-gdnyp5hh435ueGVIieHvoV4Kg&e=" target="_blank">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"><span class=""><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></span><span class="">_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu" target="_blank">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></span></blockquote></div><br></div></div>
</blockquote></div><br></div>