[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.64.0702090730260.8424@woody.linux-foundation.org>
Date: Fri, 9 Feb 2007 07:38:50 -0800 (PST)
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: David Rientjes <rientjes@...gle.com>
cc: Jan Engelhardt <jengelh@...ux01.gwdg.de>,
Jeff Garzik <jeff@...zik.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: somebody dropped a (warning) bomb
On Thu, 8 Feb 2007, David Rientjes wrote:
>
> Yes, I read the 4.1.1 docs:
>
> By default, such a bit-field is signed, because this is
> consistent: the basic integer types such as int are signed
> types.
Ok, so the gcc people have added some language. So what? The fact is, that
language has absolutely nothing to do with the C language, and doesn't
change anything at all.
> That is the whole basis for my argument, when you declare something "int,"
> most programmers would consider that to be SIGNED regardless of whether it
> is 32 bits, 13 bits, or 1 bit.
And MY argument is that YOUR argument is CRAP.
The fact is, signs of bitfields, chars and enums aren't well-defined.
That's a FACT.
Your argument makes no sense. It's like arguing against "gravity", or like
arguing against the fact that the earth circles around the sun. It us
STUPID to argue against facts.
Your argument is exactly the same argument that people used to say that
the earth is the center of the universe: "because it makes sense that
we're the center".
The fact that "most programmers" or "it makes sense" doesn't make anything
at all true. Only verifiable FACTS make something true.
There's a great saying: "Reality is that which, when you stop believing in
it, doesn't go away." - Philip K Dick.
So wake up and smell the coffee: reality is that bitfields don't have a
specified sign. It's just a FACT. Whether you _like_ it or not is simply
not relevant.
The same is true of "char". You can argue that it should be signed by
default, sicne "short", "int" and "long" are signed. But THAT IS NOT TRUE.
Arguing against reality really isn't very smart.
Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists