From: Christopher Li <sparse@chrisli.org>
To: Al Viro <viro@zeniv.linux.org.uk>
Cc: linux-sparse@vger.kernel.org
Subject: Re: [PATCH] Fix type_info_expression()
Date: Thu, 5 Feb 2009 10:29:19 -0800 [thread overview]
Message-ID: <70318cbf0902051029n11975b41l38f17a635dcf5fbd@mail.gmail.com> (raw)
In-Reply-To: <20090202073151.GC28946@ZenIV.linux.org.uk>
On Sun, Feb 1, 2009 at 11:31 PM, Al Viro <viro@zeniv.linux.org.uk> wrote:
> sizeof (typename){initializers}.foo is nice and valid C99 - it's parsed
> as sizeof primary.foo <- sizeof postfix.foo <- sizeof postfix <- sizeof unary
> <- unary. Current type_info_expression() stops too early.
Thanks for the patch. Looks great.
> - if (match_op(token, '{'))
> - token = initializer(&expr->cast_expression, token);
> + if (match_op(token, '{')) {
> + struct expression *cast = alloc_expression(p->pos, EXPR_CAST);
> + cast->cast_type = expr->cast_type;
> + expr->cast_type = NULL;
Setting expr->cast_type = NULL here is not straightly necessary right?
The expr is EXPR_SIZEOF type, the expr->cast_type is not used in
evaluation_sizeof. Of course it doesn't hurt, I just want to get a confirm
that I understand it correct.y.
Chris
next prev parent reply other threads:[~2009-02-05 18:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-02 7:31 [PATCH] Fix type_info_expression() Al Viro
2009-02-05 18:29 ` Christopher Li [this message]
2009-02-05 19:23 ` Al Viro
2009-02-05 20:21 ` Christopher Li
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=70318cbf0902051029n11975b41l38f17a635dcf5fbd@mail.gmail.com \
--to=sparse@chrisli.org \
--cc=linux-sparse@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).