Re: [PATCH] fix the comma handling in integer constant expressions

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

 



Al Viro wrote:
> [my apologies to the folks on Cc, original mails got the list address
> buggered in To:, thus the resend of the entire series just to the list]
> 
> On Wed, Jun 27, 2007 at 04:54:25PM +0100, Al Viro wrote:
>> ... or it could be done simpler, if we keep the current logics for
>> Int_const_expr flag at parse time and add a 'const expression' one
>> with rules as above.  Anyway, I'm going to get some sleep before
>> dealing with that crap.
> 
> From: Al Viro <viro@xxxxxxxxxxxxxxxxxx>
> Date: Sun, 1 Jul 2007 02:28:10 -0400
> Subject: [PATCH] fix the comma handling in integer constant expressions
> 
> Treat it as normal binary operation, taint the value, check the taint.
> We can do other kind of value tainting with the same infrastructure
> as well...
> 
> Review and testing would be welcome; AFAICS, it works, but...

Seems to work for me.  Applied.

I did notice one thing:

$ ./sparse /dev/stdin <<<"int x; struct { unsigned int i:x; };"
/dev/stdin:1:32: error: bad constant expression
/dev/stdin:1:33: error: invalid named zero-width bitfield `i'

That seems like double-warning for the same error.  Probably a pain to
suppress the second error, though.

- Josh Triplett


Attachment: signature.asc
Description: OpenPGP digital signature


[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