linux-sparse.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christopher Li <sparse@chrisli.org>
To: Kamil Dudka <kdudka@redhat.com>
Cc: linux-sparse@vger.kernel.org
Subject: Re: enum warning patch (was Re: Defect in linearization of short circuit &&)
Date: Tue, 16 Feb 2010 14:44:08 -0800	[thread overview]
Message-ID: <70318cbf1002161444m6daa6a9dh7f30d347b4e9ebbb@mail.gmail.com> (raw)
In-Reply-To: <201002162118.28516.kdudka@redhat.com>

On Tue, Feb 16, 2010 at 12:18 PM, Kamil Dudka <kdudka@redhat.com> wrote:
> I've just remembered.  There was problem on a 32bit system - 32 bytes before
> and 36 bytes after the patch applied...

Yes, size is one of the aspect. I am more worry about putting the enum
information
at the wrong place.

It is about the enum type. It should store in the type system. The
expression is one
level above the type system, it contain a ctype there.

I am much happier if that enum information can be reach from the
expr->ctype some how,
which I haven't find out yet.

While you are here. I have a question for you.

Most simple enum declare has very small set of values. So naturally I
might want to use
some thing smaller than int type to store the enum value. I can't find
a good way to play
well with the enum warnings.

If I use "char type" to store it. It trigger warning when you assign to it.
If I use "enum foo_type type:8" to store it, it will use int type
alignment and padding which
defeat the purpose of using a smaller type.

Any suggestion?

Chris
--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2010-02-16 22:44 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-14 13:39 Defect in linearization of short circuit && Jacek Śliwerski
2010-02-14 21:04 ` Jacek Śliwerski
2010-02-14 23:09   ` Christopher Li
2010-02-15 19:12     ` Jacek Śliwerski
2010-02-15 19:41       ` Christopher Li
2010-02-15 20:18         ` Jacek Śliwerski
2010-02-15 21:11           ` Christopher Li
2010-02-16  9:28             ` Bernd Petrovitsch
2010-02-16 19:02               ` Christopher Li
2010-02-16 19:10                 ` Christopher Li
2010-02-16 19:19                 ` Jacek Śliwerski
2010-02-16 19:36                   ` Christopher Li
2010-02-16 20:11                     ` enum warning patch (was Re: Defect in linearization of short circuit &&) Kamil Dudka
2010-02-16 20:18                       ` Kamil Dudka
2010-02-16 22:44                         ` Christopher Li [this message]
2010-02-17 14:00                           ` Kamil Dudka
2010-02-17 11:47                 ` Defect in linearization of short circuit && Bernd Petrovitsch
2010-02-17 20:22                   ` 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=70318cbf1002161444m6daa6a9dh7f30d347b4e9ebbb@mail.gmail.com \
    --to=sparse@chrisli.org \
    --cc=kdudka@redhat.com \
    --cc=linux-sparse@vger.kernel.org \
    /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).