C++ PATCH for c++/54922 (constexpr and anonymous union)

Jason Merrill jason@redhat.com
Fri Feb 15 01:23:00 GMT 2013


When we're building up a CONSTRUCTOR to represent the initialization 
done by a constexpr constructor, initialization of a member of an 
anonymous union shows up as an assignment to a COMPONENT_REF of the main 
class object.  We need to turn this into a CONSTRUCTOR for the anonymous 
union object itself.  This is complicated by the possibility of 
arbitrarily nested anonymous unions, and also by anonymous structures 
which are not part of C++, but are supported by G++ for C compatibility.

This is a moderately large chunk of code, but it is only hit in cases 
that were previously completely broken.

Tested x86_64-pc-linux-gnu, applying to trunk.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 54922.patch
Type: text/x-patch
Size: 5244 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20130215/d1e040fc/attachment.bin>


More information about the Gcc-patches mailing list