From: "Albert D. Cahalan" <acahalan@cs.uml.edu>
To: torvalds@transmeta.com (Linus Torvalds)
Cc: acahalanrth@twiddle.net, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] More compile warning fixes for 2.4.0
Date: Tue, 9 Jan 2001 16:24:38 -0500 (EST) [thread overview]
Message-ID: <200101092124.f09LOcB326931@saturn.cs.uml.edu> (raw)
In-Reply-To: <Pine.LNX.4.10.10101091048590.2070-100000@penguin.transmeta.com> from "Linus Torvalds" at Jan 09, 2001 10:51:23 AM
Linus Torvalds writes:
> On Tue, 9 Jan 2001, Albert D. Cahalan wrote:
>> [about labels w/o statements after them]
>>
>>>> Is this really a kernel bug? This is common idiom in C, so gcc
>>>> shouldn't warn about it. If it does, it is a bug in gcc IMHO.
>>>
>>> No, it is not a common idiom in C. It has _never_ been valid C.
>>>
>>> GCC originally allowed it due to a mistake in the grammar; we
>>> now warn for it. Fix your source.
>>
>> Since neither -ansi nor -std=foo was specified, gcc should just
>> shut up and be happy. Consider this as another GNU extension.
>
> No, it was a gcc bug that gcc accepted the syntax in the first place.
Sure. I'd always thought it was intentional though.
> Let the gcc people fix the bugs they find without complaining about them.
> After all, gcc would have been perfectly correct in signalling this as a
> syntax error, and aborted compilation. The fact that gcc only warns about
> it is a sign of grace - it's not as if it is a _useful_ extension that
> gives the programmer anything new and should be left in for that reason.
It is slightly useful: appearance, ease-of-use, etc.
Code is partly for humans to read, and is often written by
humans too. The standard syntax has worthless ugly junk.
The extension doesn't break any valid K&R, C90, or C99 code.
Obviously, considering the kernel source, people _like_ this:
void foo(void){
if(bar()) goto out;
baz();
out:
}
If it broke valid C99 code, then sure, it would have to go.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
next prev parent reply other threads:[~2001-01-09 21:25 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-01-07 2:40 Rich Baum
2001-01-07 12:41 ` Paul Gortmaker
2001-01-07 13:17 ` Keith Owens
2001-01-08 19:50 ` Erik Mouw
2001-01-08 20:17 ` Alan Cox
2001-01-09 5:30 ` Richard Henderson
2001-01-09 10:02 ` Albert D. Cahalan
2001-01-09 15:10 ` Richard B. Johnson
2001-01-09 18:51 ` Linus Torvalds
2001-01-09 21:24 ` Albert D. Cahalan [this message]
2001-01-09 21:31 ` Linus Torvalds
2001-01-10 2:20 ` Andrea Arcangeli
2001-01-10 7:10 ` Linus Torvalds
2001-01-10 13:17 ` Rich Baum
2001-01-10 13:32 ` Andrea Arcangeli
2001-01-10 16:03 ` Marco Colombo
2001-01-10 16:52 ` Alan Shutko
2001-01-10 17:32 ` Marco Colombo
2001-01-10 17:19 ` Linus Torvalds
2001-01-10 18:02 ` Marco Colombo
2001-01-10 1:58 ` Rich Baum
2001-01-09 1:23 ` Rich Baum
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=200101092124.f09LOcB326931@saturn.cs.uml.edu \
--to=acahalan@cs.uml.edu \
--cc=acahalanrth@twiddle.net \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.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®