[Top][All Lists]

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

Re: [Tinycc-devel] Add new _ISOCxx macros?

From: Christian Jullien
Subject: Re: [Tinycc-devel] Add new _ISOCxx macros?
Date: Thu, 16 Jan 2020 09:11:50 +0100

Pushed on mob.


Please note that those macros are defined by gcc only when _GNU_SOURCE is supplied.

With tcc they are unconditionally defined except on Windows (which does not use glibc at all).




From: Tinycc-devel [mailto:tinycc-devel-bounces+eligis=address@hidden] On Behalf Of ian
Sent: Thursday, January 16, 2020 07:03
To: address@hidden
Subject: *** SPAM *** Re: [Tinycc-devel] Add new _ISOCxx macros?


Hi Christian,

It seems consistent to me.


Le 16/01/2020 à 06:55, Christian Jullien a écrit :

Hi all,


When we use tcc on Linux, we also use /usr/include/*.h.

Some definitions are only visible for C11 and controlled by use of _ISOC11_SOURCE as used by glibc (see for example http://man7.org/linux/man-pages/man7/feature_test_macros.7.html).


As tcc is C99 by default, I propose to also automatically set _ISOC99_SOURCE by default but _ISOC11_SOURCE when -std=c11 is used.






    _ISOC99_SOURCE (since glibc 2.1.3)

               Exposes declarations consistent with the ISO C99 standard.


               Earlier glibc 2.1.x versions recognized an equivalent macro

               named _ISOC9X_SOURCE (because the C99 standard had not then

               been finalized).  Although the use of this macro is obsolete,

               glibc continues to recognize it for backward compatibility.


               Defining _ISOC99_SOURCE also exposes ISO C (1990) Amendment 1

               ("C95") definitions.  (The primary change in C95 was support

               for international character sets.)


               Invoking the C compiler with the option -std=c99 produces the

               same effects as defining this macro.


       _ISOC11_SOURCE (since glibc 2.16)

               Exposes declarations consistent with the ISO C11 standard.

               Defining this macro also enables C99 and C95 features (like



               Invoking the C compiler with the option -std=c11 produces the

               same effects as defining this macro.

Tinycc-devel mailing list

-- address@hidden
-- Développeur compulsif

reply via email to

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