Hi Richard, Please find the modified patch. Using TypeSourceInfo to conclude in an array was of incomplete type. Added a test case for the same.Please let me know if the patch is ok. Thanks!
------- Original Message ------- Sender : Richard Smith<[email protected]> Date : Oct 15, 2013 13:36 (GMT+09:00) Title : Re: [Patch] Unknown-bound array static data member of template shouldd be type dependent Oh, and please do include a test. Feel free to start a test/CXX/drs/dr4xx.cpp for this. On Mon, Oct 14, 2013 at 9:34 PM, Richard Smith <[email protected]> wrote: The addition of WasIncompleteArray pushes us up to 33 bits in VarDecl, and will cause us to use more memory on 32-bit systems. Do you really need to store this bit? This seems like something that could be reconstructed from the TypeSourceInfo. Instead of setting a flag on the variable, how about directly giving the definition of the variable a dependent type? On Mon, Oct 7, 2013 at 2:25 AM, KARTHIKVENKATESH BHAT <[email protected]> wrote: Hi All, Please find attached the patch to fix issue #408 discussed at http://open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html As per this "An explicit specialization of a static data member declared as an array of unknown bound can have a different bound from its definition, if any" . This fixes the problem in which clang fails to produce executable in these cases- e.g. http://searchcode.com/codesearch/raw/8024712 The patch tests that if a static data member of a current instantiation is incomplete array type mark it as type dependent. This is similar to the way it is currently fixed in gcc. I'm not sure were the TC for this patch will go hence not added a TC for now. Please let me know if the patch looks good. Thanks and Regards Karthik Bhat _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
dr408.patch
Description: Binary data
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
