From: Andi Kleen <ak@suse.de>
To: Stephan von Krawczynski <skraw@ithnet.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Compiling kernel with SuSE 8.2/gcc 3.3
Date: 08 Apr 2003 15:14:05 +0200 [thread overview]
Message-ID: <p73n0j1xhb5.fsf@oldwotan.suse.de> (raw)
In-Reply-To: <20030408134240.45cdad7e.skraw@ithnet.com.suse.lists.linux.kernel>
Stephan von Krawczynski <skraw@ithnet.com> writes:
> during tests with latest SuSE distro 8.2 compiling 2.4.21-pre6 showed a lot of
> "comparison between signed and unsigned" warnings. It looks like SuSE ships gcc
The warning is in earlier gccs too, but turned off by default there.
I don't know why it was turned on by default in gcc 3.3 by the gcc maintainers,
but it gives so much noise that I tend to turn it off during the build (-Wno-sign-compare)
Fixing it is usually not trivial. Yes, you could go through the source
and add casts to the comparisons, but that would miss the point
(assuming there is a point in this warning, I'm not 100% sure on that
;) Really it needs someone to audit these comparisons and determine
what signedness the comparisons should be in. But that requires some
understanding of the code; it's not a brainless "janitor job" even
if it looks like this on the first look.
Most of them come from a few headers.
e.g. I already submitted patches for the skbuff.h warnings for 2.5.
> 3.3 (prerelease). Is this compiler known to work for kernel compilation? Should
> therefore all these warnings be fixed?
I use it to build kernels and have not found a compiler caused problem with
it yet. Most of the kernel problems with specific gcc versions used to
be kernel bugs anyways (like broken inline assembly or missing compile barriers)
and most of them should be weeded out now from the experience with previous
gcc versions.
It does not accept unprotected new lines in strings anymore. Some
versions of the aic7xxx driver use that. Fixing it is trivial,
also the new aic7xxx driver in 2.4.21pre7 has it now fixed too.
The only thing what's a bit fishy in that compiler is the inlining algorithm
which tends to not inline functions anymore that have been previously inlined.
causing constant propagation to fail and some unnecessary code be generated.
This can be worked around though by putting
#define inline __attribute__((always_inline)) inline
#define __inline __attribute__((always_inline)) inline
#define __inline__ __attribute__((always_inline)) inline
into linux/compiler.h. This is more an code quality than correctness
issue for i386 (x86-64 had one case where it broke code, but that's
fixed already)
But really, it does generate significantly better code for some things
than 3.2.
-Andi
next parent reply other threads:[~2003-04-08 13:02 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20030408134240.45cdad7e.skraw@ithnet.com.suse.lists.linux.kernel>
2003-04-08 13:14 ` Andi Kleen [this message]
[not found] <3EE6B7A2.3000606@austin.rr.com.suse.lists.linux.kernel>
2003-06-11 8:01 ` Andi Kleen
2003-06-12 1:24 ` Steve French
2003-06-12 1:40 ` Andrew Morton
2003-06-12 2:17 ` Riley Williams
2003-06-12 2:00 ` Linus Torvalds
2003-06-12 12:52 ` Horst von Brand
2003-06-11 5:01 Steve French
2003-06-11 11:20 ` Richard B. Johnson
2003-06-11 13:59 ` Richard B. Johnson
2003-06-11 11:28 ` Matthias Andree
2003-06-11 16:12 ` Andreas Schwab
[not found] <20030408115008$0cd2@gated-at.bofh.it>
2003-04-08 12:02 ` Arnd Bergmann
-- strict thread matches above, loose matches on Subject: below --
2003-04-08 11:42 Stephan von Krawczynski
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=p73n0j1xhb5.fsf@oldwotan.suse.de \
--to=ak@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=skraw@ithnet.com \
/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®