Re: declaration specifiers wooziness

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

 



On Wed, Jun 27, 2007 at 08:39:35AM -0700, Josh Triplett wrote:
> 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.
 
It is optional for structs, unions and enums.

> > >> "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.

... only because any compiler is going to throw up on it anyway.
-
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