From: Nix <nix@esperi.org.uk>
To: "Clayton Weaver" <cgweav@email.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: support of older compilers
Date: Fri, 05 Nov 2004 15:36:43 +0000 [thread overview]
Message-ID: <87is8k71f8.fsf@amaterasu.srvr.nix> (raw)
In-Reply-To: <20041104193349.9DE511F50B1@ws1-2.us4.outblaze.com> (Clayton Weaver's message of "4 Nov 2004 20:03:05 -0000")
On 4 Nov 2004, Clayton Weaver stated:
> I found that none of the gcc 3.x versions could
> correctly compile a construct like this
> (independent of runtime glibc version):
>
> file1.h:
>
> /* header boilerplate to avoid multiple #includes of
> the same file */
>
> #define STR1 "string 1"
>
> file2.c:
>
> #include "file1.h"
>
> const char * str2 = "whatever"STR1"stuff this\n\
> string has in it"STR1" and so on ad infinitum\n\
> "STR1"yada yada";
>
> /* this was actually about 40 lines, maybe more,
> with maybe 10 instances of "../"STR1"..." */
>
> All of the gcc-3.x versions would bail with
> an error trying to compile that str2 definition
> in file2.c.
And do I see any bug reports from you in GCC bugzilla? I do not (not
under the name `Clayton Weaver', anyway).
Further, the code you provide works in all the GCC-3.x versions I've got
here.
If you don't even *report* the bug, how can you expect it to get fixed?
> They didn't always fail on literal string
> concatenation (IIRC some short ones compiled
> ok), but they consistently failed to concatenate
> literal strings correctly for some source
> files that gcc-2.95.3 would compile correctly
> every time.
The preprocessor was totally rewritten between GCC-2.95.x and GCC-3.x: a
number of things that were valid in 2.95.x but invalid under ISO C were
made to not work in 3.x (for example, the compiler warns about attempts
to concatenate two things with ## that aren't preprocessing tokens, and
eventually this was made a hard error, IIRC).
This is, of course, not a bug.
I can find no mention of string concatenation bugs against the new
preprocessor relating to anything other than token pasting (and all of
those bugs are people trying to token-paste things that aren't tokens,
generally strings).
> (The glibc trees had distributor patches, so I filed
> the bug report via their support
What? You found a compiler bug, so you reported it as a bug against
glibc?
> In sum: for production code it doesn't matter
> what all a new C compiler version can do that
> the old one could not if it won't compile
> quite ordinary standard C correctly.
... especially if the people who see the problems don't report them and
don't provide reproducible testcases.
> It would be good to have bugs fixed in the new compilers,
It would be good if people would report bugs in the new compilers. :)
> because they
> obviously have some advantages (I noticed that gcc-3.4.x seemed quite
> a bit faster than 2.95.3 when compiling glibc,
It is quite a bit slower :(
--
`Preliminary analysis reveal there are few impact craters on Titan. This
suggests Cassini has an active surface constantly being resurfaced.'
--- BBC News Online introduces a new planetary body
next prev parent reply other threads:[~2004-11-05 15:37 UTC|newest]
Thread overview: 59+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-04 19:33 support of older compilers Clayton Weaver
2004-11-05 15:36 ` Nix [this message]
[not found] <2Xj2s-5vj-33@gated-at.bofh.it>
2004-11-06 10:15 ` Anton Ertl
-- strict thread matches above, loose matches on Subject: below --
2004-11-06 9:07 Clayton Weaver
2004-11-09 17:39 ` Nix
2004-11-04 22:49 Xose Vazquez Perez
2004-11-03 21:02 Timothy Miller
2004-11-03 21:13 ` Christoph Hellwig
2004-11-03 21:22 ` Chris Wedgwood
2004-11-03 23:06 ` Adam Heath
2004-11-03 23:30 ` Chris Wedgwood
2004-11-04 16:50 ` Adam Heath
2004-11-04 17:00 ` Chris Friesen
2004-11-04 18:17 ` Adam Heath
2004-11-05 20:00 ` Willy Tarreau
2004-11-05 20:28 ` Geert Uytterhoeven
2004-11-05 20:31 ` Willy Tarreau
2004-11-04 17:04 ` Valdis.Kletnieks
2004-11-04 18:15 ` Adam Heath
2004-11-04 18:31 ` Valdis.Kletnieks
2004-11-04 21:56 ` Adam Heath
2004-11-04 18:54 ` Ian Romanick
2004-11-04 19:48 ` Christoph Hellwig
2004-11-04 20:14 ` Giuseppe Bilotta
2004-11-05 20:04 ` Willy Tarreau
2004-11-04 19:36 ` Ian Hastie
2004-11-04 20:02 ` Ioan Ionita
2004-11-04 20:03 ` Adrian Bunk
2004-11-04 20:08 ` Valdis.Kletnieks
2004-11-04 19:38 ` Linus Torvalds
2004-11-04 21:47 ` Adam Heath
2004-11-04 21:55 ` Linus Torvalds
2004-11-04 23:39 ` Adam Heath
2004-11-04 23:52 ` Linus Torvalds
2004-11-05 1:41 ` Andries Brouwer
2004-11-05 15:41 ` Linus Torvalds
2004-11-05 15:47 ` Arjan van de Ven
2004-11-05 16:22 ` linux-os
2004-11-05 19:50 ` Chris Wedgwood
2004-11-05 20:28 ` Linus Torvalds
2004-11-05 21:59 ` Grzegorz Kulewski
2004-11-05 22:08 ` Linus Torvalds
2004-11-05 22:08 ` Hua Zhong
2004-11-06 8:38 ` Willy Tarreau
2004-11-06 9:43 ` Hugh Dickins
2004-11-06 11:04 ` Willy Tarreau
2004-11-06 12:07 ` Andries Brouwer
2004-11-06 17:33 ` Linus Torvalds
2004-11-06 19:36 ` Adrian Bunk
2004-11-05 20:20 ` Willy Tarreau
2004-11-05 22:19 ` Adam Heath
2004-11-04 22:36 ` Martin J. Bligh
2004-11-04 20:48 ` Bill Davidsen
2004-11-04 22:33 ` Martin J. Bligh
2004-11-03 21:17 ` Matti Aarnio
2004-11-03 21:37 ` Giacomo A. Catenazzi
2004-11-03 21:57 ` Valdis.Kletnieks
2004-11-04 2:16 ` Miles Bader
2004-11-03 22:07 ` Chris Wedgwood
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=87is8k71f8.fsf@amaterasu.srvr.nix \
--to=nix@esperi.org.uk \
--cc=cgweav@email.com \
--cc=linux-kernel@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.