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: Michael Matz
Subject: Re: [Tinycc-devel] revert of "Identifiers can start and/or contain"
Date: Fri, 15 Apr 2016 18:14:33 +0200 (CEST)
User-agent: Alpine 2.20 (LSU 67 2015-01-07)

Hi,

On Thu, 14 Apr 2016, Vladimir Vissoultchev wrote:

> > Which compiler are you used?
> > #if PATHCMP==stricmp
> >        strupr(buf1);
> > #endif
> 
> I'm using tinycc to compile this...  Kidding :-)) Here it is:
> 
>       C:\Users\wqw>gcc --version
>       gcc (i686-win32-dwarf-rev0, Built by MinGW-W64 project) 5.3.0
> 
> Although I'm debugging mostly in VS2015.

'#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).

> > gcc 3.4.6 don't understand this.
> > Suggested change:
> > -#if PATHCMP==stricmp
> > +#ifdef _WIN32
> 
> Thought about that but there might be other targets with case-insensitive
> FS.

Not yet.

> Probably a separate PATH_NOCASE and then #ifdef PATH_NOCASE?

That won't help because strupr() is no standard C function, but is 
specific to windows, so that define is the correct one to use.


Ciao,
Michael.



reply via email to

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