[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Devel] Re: Summary of ANSI preprocessor trouble..
From: |
Werner LEMBERG |
Subject: |
Re: [Devel] Re: Summary of ANSI preprocessor trouble.. |
Date: |
Thu, 14 Dec 2000 15:27:09 +0100 (CET) |
> > the following lines do not compile with LCC:
> >
> > #define PATH(d,x) <##d##/##x##>
> > #define MY_FILE_H PATH(mydir,myfile)
> >
> > the compiler complains that ## produced an invalid _token_,
> > named "<mydir". It seems that LCC really insists that
> > _every_ concatenation creates a "valid" token, instead
> > of checking only the end result.
>
> The standard perfectly allows it to go this way.
Alas, compilers of major software companies (Microsoft, Sun) fail.
What shall we do? As pointed out by others on this list already, we
have to find the least denominator.
Believe me, I really dislike this.
> Also the standard says explicitely that in the form
> #include PATH(mydir,myfile), macro subtitutions are to be
> performed.
As reported, Visual C++ can't handle this.
> An example is even provided. So this is not likely to be left
> unimplementated in not-so-compliant compilers.
All compiler are equal, but some are more equal than others.
Werner
- [Devel] Summary of ANSI preprocessor trouble.., (continued)
[Devel] Re: [Freetype] compiling with 2.0.1 fails (new scheme), David Turner, 2000/12/12