On Wed, May 03, 2017 at 01:10:12PM -0400, Lance Richardson wrote: > I noticed when browsing parse.c that function parameters declared > using K&R syntax are parsed by calling declaration_list(), which > seems to have been intended for parsing structure member declarations > and accepts bit-field syntax. > > So e.g. this is (incorrectly) accepted by sparse: > > static int foo(b) > int b: 4; > { > return 0; > } Hmmm yes. 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. Nice catch. -- 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