All of lore.kernel.org
 help / color / mirror / Atom feed
From: Al Viro <viro@ftp.linux.org.uk>
To: Josh Triplett <josht@linux.vnet.ibm.com>
Cc: Derek M Jones <derek@knosof.co.uk>,
	Alexey Dobriyan <adobriyan@sw.ru>,
	linux-sparse@vger.kernel.org, adobriyan@gmail.com
Subject: Re: declaration specifiers wooziness
Date: Wed, 27 Jun 2007 16:41:52 +0100	[thread overview]
Message-ID: <20070627154152.GW21478@ftp.linux.org.uk> (raw)
In-Reply-To: <1182958775.8970.56.camel@josh-work.beaverton.ibm.com>

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.

      reply	other threads:[~2007-06-27 15:42 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-27 10:33 declaration specifiers wooziness Alexey Dobriyan
2007-06-27 15:01 ` Josh Triplett
2007-06-27 15:16   ` Derek M Jones
2007-06-27 15:31     ` Alexey Dobriyan
2007-06-27 15:34       ` Derek M Jones
2007-06-27 15:44         ` Derek M Jones
2007-06-27 15:48           ` Josh Triplett
2007-06-27 16:00           ` Al Viro
2007-06-27 15:39     ` Al Viro
2007-06-27 15:39     ` Josh Triplett
2007-06-27 15:41       ` Al Viro [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070627154152.GW21478@ftp.linux.org.uk \
    --to=viro@ftp.linux.org.uk \
    --cc=adobriyan@gmail.com \
    --cc=adobriyan@sw.ru \
    --cc=derek@knosof.co.uk \
    --cc=josht@linux.vnet.ibm.com \
    --cc=linux-sparse@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.