Re: enum warning patch (was Re: Defect in linearization of short circuit &&)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Feb 16, 2010 at 12:18 PM, Kamil Dudka <kdudka@xxxxxxxxxx> 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@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux