From: Christopher Li <sparse@chrisli.org>
To: Kamil Dudka <kdudka@redhat.com>
Cc: Josh Triplett <josh@joshtriplett.org>,
Stephen Hemminger <shemminger@vyatta.com>,
linux-sparse@vger.kernel.org, Al Viro <viro@zeniv.linux.org.uk>,
Morten Welinder <terra@gnome.org>
Subject: Re: [PATCH] add warnings enum-to-int and int-to-enum
Date: Thu, 3 Sep 2009 11:38:24 -0700 [thread overview]
Message-ID: <70318cbf0909031138s4c066005vcd8b8f614723b05f@mail.gmail.com> (raw)
In-Reply-To: <200909031347.35371.kdudka@redhat.com>
On Thu, Sep 3, 2009 at 4:47 AM, Kamil Dudka<kdudka@redhat.com> wrote:
> Do you want to store the correct enum type to expression->ctype and overwrite
> it later with some integral type? What's the advantage of this approach?
> (instead of preserving ABI which is already changed to 0.4.1). I don't think
> the information about type for enum constant is useful only for issuing
> warnings like this. Some SPARSE clients might also need such information.
I think it is cleaner to have one single place to look for the ctype of
an expression.We don't have to convert it to int type. I think most of the
sparse code can deal with enum type any way. I don't like the dual personality
of expressions.
An other reason is that you increase the expression structure size for
32 bit system. Expression and symbol are the most common used
structure. It take up a good portion of the sparse memory foot print. I
want to keep them as lean as possible.
> Sure if anybody is able to split it... Unfortunately we have no reference for
> the "original" behavior of -Wmismatch-enum. I didn't found it documented
> anywhere and the "test-case" from the referred commit is not really useful as
> a test-case. I have not enough time for reverse engineering...
I don't see why it is hard to split. Can we just make the code which add
new options and issue new warnings to a separate patch? We shouldn't
need to reverse engineering the old behavior to do that.
>
> I think the tests included in the patch have good enough coverage to prevent
> you from a future regression and it sounds more important to me than
> documenting previous regressions :-)
Yes I agree the test case is always useful.
Chris
next prev parent reply other threads:[~2009-09-03 18:38 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-30 22:32 sparse segv with simple test Stephen Hemminger
2009-08-30 22:53 ` Kamil Dudka
2009-08-31 15:57 ` Stephen Hemminger
2009-08-31 18:12 ` Kamil Dudka
2009-08-31 18:49 ` Stephen Hemminger
2009-08-31 19:04 ` Kamil Dudka
2009-08-31 20:53 ` Josh Triplett
2009-09-01 21:59 ` [PATCH] add warnings enum-to-int and int-to-enum Kamil Dudka
2009-09-01 23:24 ` Josh Triplett
2009-09-02 0:27 ` Stephen Hemminger
2009-09-02 17:56 ` Daniel Barkalow
2009-09-02 18:04 ` Kamil Dudka
2009-09-02 18:43 ` Daniel Barkalow
2009-09-02 18:56 ` Josh Triplett
2009-09-02 19:19 ` Daniel Barkalow
2009-09-02 19:58 ` Kamil Dudka
2009-09-02 11:53 ` Kamil Dudka
2009-09-02 15:21 ` Josh Triplett
2009-09-02 16:23 ` Kamil Dudka
2009-09-02 16:38 ` Christopher Li
2009-09-02 19:03 ` Josh Triplett
2009-09-02 19:19 ` Kamil Dudka
2009-09-02 22:35 ` Kamil Dudka
2009-09-03 9:42 ` Christopher Li
2009-09-03 11:47 ` Kamil Dudka
2009-09-03 18:38 ` Christopher Li [this message]
2009-09-03 18:54 ` Kamil Dudka
2009-09-03 20:02 ` Christopher Li
2009-09-13 19:28 ` Kamil Dudka
2009-09-13 19:55 ` Christopher Li
2009-09-13 20:09 ` Kamil Dudka
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=70318cbf0909031138s4c066005vcd8b8f614723b05f@mail.gmail.com \
--to=sparse@chrisli.org \
--cc=josh@joshtriplett.org \
--cc=kdudka@redhat.com \
--cc=linux-sparse@vger.kernel.org \
--cc=shemminger@vyatta.com \
--cc=terra@gnome.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).