[patch] Add CONSTRUCTOR_NO_CLEARING flag
Eric Botcazou
ebotcazou@adacore.com
Mon Nov 11 11:26:00 GMT 2013
Hi,
in Ada 2012 it is allowed to omit components of aggregates (the equivalent of
initializers/constructors); in this case, the contents of the corresponding
fields in the record become undefined. Now the gimplifier implements the C
semantics of clearing the missing components, so this patch introduces a new
flag on constructors to modify that.
Tested on x86_64-suse-linux, OK for the mainline?
2013-11-11 Tristan Gingold <gingold@adacore.com>
Eric Botcazou <ebotcazou@adacore.com>
* tree.h (CONSTRUCTOR_NO_CLEARING): Define.
* tree-core.h (CONSTRUCTOR_NO_CLEARING): Document it.
* tree.def (CONSTRUCTOR): Likewise.
* gimplify.c (gimplify_init_constructor): Do not clear the object when
the constructor is incomplete and CONSTRUCTOR_NO_CLEARING is set.
ada/
* gcc-interface/utils2.c (gnat_build_constructor): Also set the flag
CONSTRUCTOR_NO_CLEARING on the constructor.
--
Eric Botcazou
-------------- next part --------------
A non-text attachment was scrubbed...
Name: no_clearing.diff
Type: text/x-patch
Size: 2753 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20131111/709bccfb/attachment.bin>
More information about the Gcc-patches
mailing list