mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mikael Pettersson <mikpe@it.uu.se>
To: Amerigo Wang <amwang@redhat.com>
Cc: linux-kernel@vger.kernel.org, akpm@linux-foundation.org,
	Sam Ravnborg <sam@ravnborg.org>
Subject: Re: [RFC Patch] kbuild: remove -Wdeclaration-after-statement
Date: Wed, 23 Sep 2009 12:19:21 +0200	[thread overview]
Message-ID: <19129.63017.997311.767124@pilspetsen.it.uu.se> (raw)
In-Reply-To: <20090923094034.23512.90809.sendpatchset@localhost.localdomain>

Amerigo Wang writes:
 > 
 > I got lots of "ISO C90 forbids mixed declarations and code" warnings
 > during compile today's kernel.
 > 
 > I think we can remove the gcc option '-Wdeclaration-after-statement'
 > now, since we already have C99 for 10 years. :)
 > 
 > Signed-off-by: WANG Cong <amwang@redhat.com>
 > Cc: Sam Ravnborg <sam@ravnborg.org>
 > 
 > ---
 > diff --git a/Makefile b/Makefile
 > index 433493a..038bda2 100644
 > --- a/Makefile
 > +++ b/Makefile
 > @@ -559,9 +559,6 @@ endif
 >  NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include)
 >  CHECKFLAGS     += $(NOSTDINC_FLAGS)
 >  
 > -# warn about C99 declaration after statement
 > -KBUILD_CFLAGS += $(call cc-option,-Wdeclaration-after-statement,)
 > -
 >  # disable pointer signed / unsigned warnings in gcc 4.0
 >  KBUILD_CFLAGS += $(call cc-option,-Wno-pointer-sign,)

This is more a matter of coding-style policy than C technicalities.

I happen to hate declarations at random places in the code, so I'd
prefer the offending code to be fixed instead.

  reply	other threads:[~2009-09-23 10:20 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-23  9:38 Amerigo Wang
2009-09-23 10:19 ` Mikael Pettersson [this message]
2009-09-23 10:41 ` Johannes Weiner
2009-09-23 10:51 ` Sam Ravnborg
2009-09-25 20:18   ` Randy Dunlap
2009-09-25 20:52     ` Sam Ravnborg
2009-09-26  1:06   ` Amerigo Wang

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=19129.63017.997311.767124@pilspetsen.it.uu.se \
    --to=mikpe@it.uu.se \
    --cc=akpm@linux-foundation.org \
    --cc=amwang@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sam@ravnborg.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®