This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] Add CONSTRUCTOR_NO_CLEARING flag
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Eric Botcazou <ebotcazou at adacore dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 11 Nov 2013 14:11:50 +0100
- Subject: Re: [patch] Add CONSTRUCTOR_NO_CLEARING flag
- Authentication-results: sourceware.org; auth=none
- References: <1396974 dot au2QbtdziC at polaris>
On Mon, Nov 11, 2013 at 11:55 AM, Eric Botcazou <ebotcazou@adacore.com> wrote:
> 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?
Ok. Can you update doc/generic.texi?
Thanks,
Richard.
>
> 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