On Wed, 2007-06-27 at 16:16 +0100, Derek M Jones wrote: > Alex, Josh, > > > On Wed, 2007-06-27 at 14:33 +0400, Alexey Dobriyan wrote: > >> sparse silently accepts some peculiar combinations of declaration > >> specifiers: > > These are all permitted by the syntax of C. > > 6.7 Declarations, the init-declarator-list is optional. Huh; interesting. That explains "int volatile;" as well; it doesn't parse as an attempt to declare an integer named volatile, but as a declaration with no variable. > >> "typedef extern;" passes. > ... > >> Not sure how many different bugs there are here, though... > > Sparse might flag the usage as suspicious, but it is not a bug. Probably not worth the trouble of flagging. > > Several more: > > The syntax permits: > > signed unsigned short long double int; I would hope it does not permit "double int". Sparse will in fact spew errors about *that* syntax: /dev/stdin:1:8: error: You cannot have both signed and unsigned modifiers. /dev/stdin:1:17: error: You cannot have both signed and unsigned modifiers. /dev/stdin:1:23: error: You cannot have both long and short modifiers. /dev/stdin:1:23: error: You cannot have both signed and unsigned modifiers. /dev/stdin:1:28: error: modifier [signed] [unsigned] is invalid in this context /dev/stdin:1:28: error: You cannot have both signed and unsigned modifiers. /dev/stdin:1:35: error: Trying to use reserved word 'int' as identifier - Josh Triplett - 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