From: Johannes Weiner <hannes@cmpxchg.org>
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:41:51 +0200 [thread overview]
Message-ID: <20090923104151.GA22262@cmpxchg.org> (raw)
In-Reply-To: <20090923094034.23512.90809.sendpatchset@localhost.localdomain>
Hi,
On Wed, Sep 23, 2009 at 05:38:01AM -0400, Amerigo Wang wrote:
>
> I got lots of "ISO C90 forbids mixed declarations and code" warnings
> during compile today's kernel.
Yeah, see http://lkml.org/lkml/2009/9/22/585 .
> I think we can remove the gcc option '-Wdeclaration-after-statement'
> now, since we already have C99 for 10 years. :)
It's still ugly and uncommon to have variable declarations appear
randomly in block bodies, please keep the warning.
> 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,)
Hannes
next prev parent reply other threads:[~2009-09-23 10:42 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
2009-09-23 10:41 ` Johannes Weiner [this message]
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=20090923104151.GA22262@cmpxchg.org \
--to=hannes@cmpxchg.org \
--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®