From: Christopher Li <sparse@chrisli.org>
To: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Cc: Linux-Sparse <linux-sparse@vger.kernel.org>
Subject: Re: [PATCH v2 4/6] fix implicit zero initializer.
Date: Wed, 31 May 2017 23:41:32 -0700 [thread overview]
Message-ID: <CANeU7Qnsadz4VYNDOwCk0x+8W9HH0zWXxD5qxcxuXVqd+ppDWA@mail.gmail.com> (raw)
In-Reply-To: <20170408211901.40507-5-luc.vanoostenryck@gmail.com>
On Sat, Apr 8, 2017 at 2:18 PM, Luc Van Oostenryck
<luc.vanoostenryck@gmail.com> wrote:
> diff --git a/linearize.c b/linearize.c
> index 5c273a91d..f628f5a74 100644
> --- a/linearize.c
> +++ b/linearize.c
> @@ -1635,6 +1635,21 @@ static pseudo_t linearize_one_symbol(struct entrypoint *ep, struct symbol *sym)
>
> sym->initialized = 1;
> ad.address = symbol_pseudo(ep, sym);
> +
> + if (sym->initializer && !is_scalar_type(sym)) {
> + // default zero initialization [6.7.9.21]
> + // FIXME: this init the whole aggregate while
> + // only the existing fields need to be initialized.
> + // FIXME: this init the whole aggregate even if
> + // all fields arelater explicitely initialized.
Some very minor comment. The multi-line comment should be
written in the C type. /* ... */
Chris
next prev parent reply other threads:[~2017-06-01 6:41 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-08 21:18 [PATCH v2 0/6] fix bitfield initializers Luc Van Oostenryck
2017-04-08 21:18 ` [PATCH v2 1/6] add support for a new flag: -fdump-linearize[=only] Luc Van Oostenryck
2017-04-08 21:18 ` [PATCH v2 2/6] remove bit_size & bit_offset from struct access_data Luc Van Oostenryck
2017-04-08 21:18 ` [PATCH v2 3/6] add test case for linearize_initializer() of bitfields Luc Van Oostenryck
2017-04-08 21:18 ` [PATCH v2 4/6] fix implicit zero initializer Luc Van Oostenryck
2017-06-01 6:41 ` Christopher Li [this message]
2017-04-08 21:19 ` [PATCH v2 5/6] remove alignment from struct access_data Luc Van Oostenryck
2017-04-08 21:19 ` [PATCH v2 6/6] remove origval " Luc Van Oostenryck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CANeU7Qnsadz4VYNDOwCk0x+8W9HH0zWXxD5qxcxuXVqd+ppDWA@mail.gmail.com \
--to=sparse@chrisli.org \
--cc=linux-sparse@vger.kernel.org \
--cc=luc.vanoostenryck@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.