Re: bit-field notation and k&r function syntax

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

 



On Wed, May 03, 2017 at 09:50:14PM -0400, Christopher Li wrote:
> On Wed, May 3, 2017 at 7:07 PM, Luc Van Oostenryck
> <luc.vanoostenryck@xxxxxxxxx> wrote:
> > What's sparse use 'declaration_list()' for is not what correspond
> > to the standard's 'declaration-list' but is indeed for something
> > that should be reserved to structs.
> 
> I think declaration_list() can add one argument "is_struct" to
> indicate parse for struct or not.
> Only in struct mode we do the ":" and handle_bitfield() thing.
> There are only two caller of declaration_list() so that should fix it.

Yes, but there are a few details we need to look at.
For example, this should be supported (GCC does)
	int foo(a)
		register int a;
	{
		return a;
	}

But this we should warn on this
	struct s {
		register int a;
	};
And currently, we don't.

-- Luc
--
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