This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: cpp problem found by imake
On Thu, May 04, 2000 at 03:50:07AM +0200, Marc Espie wrote:
> In article <20000503001156.C29519@wolery.cumb.org> you write:
> >I'm going to have to ask you what X11 is _really_ trying to achieve
> >here, because this seems utterly perverse, and I'll bet there's a
> >simpler and more portable way. I've got XFree 4.0 source lying
> >around, but I can't find the place where it does this.
>
> You realize that this is not really acceptable.
>
> There are literally hundreds of projects out there that use imake.
> Some of them are reasonably old, and poorly maintained.
> Some include fairly large Project.tmpl files.
I don't want to give the impression that we'll definitely break imake.
My main concern is that supporting imake clashes with standards
conformance. You see, the result of pasting '<' with 'X11' is not a
legal preprocessor token. This is explicitly undefined behavior, and
I'd like to issue warnings or reject.
For this particular instance a warning, disabled with -traditional,
and Doing What You Meant would be the right way to go. There is no
trouble implementing it once I get the damn tokenizing lexer to work
properly.
However, I'm worried that there's going to be some other place where
supporting some grotty old abuse of the preprocessor clashes with
supporting standard-conforming C programs, and the clash won't be as
easy to resolve. And at that point, sorry, the grotty old abuse is
going to lose.
[This has nothing to do with the error you get _now_, which is caused
by a genuine bug, which will be fixed Real Soon.]
zw