tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] revert of "Identifiers can start and/or contain"


From: Vladimir Vissoultchev
Subject: Re: [Tinycc-devel] revert of "Identifiers can start and/or contain"
Date: Mon, 18 Apr 2016 14:15:07 +0300

> '#if PATHCMP==stricmp' doesn't do what you want anyway.  The preprocessor
== can't 
> compare strings, so the above is always true (because no matter if PATHCMP
is 
> defined to stricmp or not defined it evaluates to zero, and as stricmp is
no macro 
> it evaluates to zero as well).

Btw, had some time to do a test with this snippet:

#define PATHCMP stricmp

#if PATHCMP==stricmp
    #error Michael is wrong
#else
    #error Michael is right
#endif

and got these results:

C:> tcc -c test.c
test.c:4: error: #error Michael is wrong

C:> gcc -c test.c
test.c:4:6: error: #error Michael is wrong
     #error Michael is wrong
      ^

This surprises me a lot, as I thought it was only VS that was being "clever"
and had me tricked here.

Probably this was impl as an extension by some version of gcc onwards or is
it part of the standard now?

cheers,
</wqw>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]