This is the mail archive of the
mailing list for the GCC project.
ISO C violation (really -- style & string pasting)
- To: "egcs at egcs dot cygnus dot com" <egcs at egcs dot cygnus dot com>
- Subject: ISO C violation (really -- style & string pasting)
- From: Donn Terry <donn at interix dot com>
- Date: Wed, 24 Mar 1999 17:34:18 -0700
In i386.md, there's a potential ISO C violation:
"_GLOBAL_OFFSET_TABLE_" is spelled literally with a single
leading "_", and appears inside longer strings. (Ditto in
i386.c.). On many systems ((most?) ELF included), this is fine
because the namespace doesn't implictly prefix "_".
However, on those that do prefix "_" (e.g. a.out, coff for i386
Windows), this violates namespace because it collides with the user
The easy fix to this is to use a #define and (ISO) string-pasting.
However, I suspect the style rules disallow string-pasting.
(If they don't, then we're done, and I'm home free.)
If I can't use string pasting, the ASn macros come close to
doing what I need, but not quite. I'd propose introducing
a new one that does do the right thing. Any problems with
that (other than making sure it works with old cpp-s?)
Also, there are two ways to do this: paste in (however it's
done) just the "_", or the whole symbol name. Once I
come up with a solution, it doesn't really matter which I do
(and I believe there already is a define for the prefix
character, but its name escapes me this moment). Does anyone
have any preferences?
Donn Terry mailto:firstname.lastname@example.org
Softway Systems, Inc. http://www.interix.com
2850 McClelland Dr, Ste. 1800 Ft.Collins CO 80525
Tel: +1-970-204-9900 Fax: +1-970-204-9951