X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f X-Recipient: djgpp AT delorie DOT com Date: Sat, 06 Jun 2015 16:32:07 +0300 From: "Eli Zaretskii (eliz AT gnu DOT org)" Subject: Re: DJGPP v2.05: some thoughts In-reply-to: <20150606054809.810@kylheku.com> X-012-Sender: halo1 AT inter DOT net DOT il To: djgpp AT delorie DOT com Message-id: <83wpzhm088.fsf@gnu.org> References: <55673F0B DOT 1090103 AT iki DOT fi> <83twuwwshg DOT fsf AT gnu DOT org> <55675040 DOT 9030008 AT iki DOT fi> <556F6E49 DOT 8010006 AT gmx DOT de> <556FCCDF DOT 7080005 AT iki DOT fi> <83bngvr0ef DOT fsf AT gnu DOT org> <557078B1 DOT 9040004 AT iki DOT fi> <201506041613 DOT t54GDT8m014488 AT delorie DOT com> <5570B1F7 DOT 1070509 AT iki DOT fi> <83pp5aprqw DOT fsf AT gnu DOT org> <20150606054809 DOT 810 AT kylheku DOT com> Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk > From: "Kaz Kylheku (kaz AT kylheku DOT com)" > Date: Sat, 6 Jun 2015 12:59:47 +0000 (UTC) > Bytes: 2803 > > On 2015-06-05, Eli Zaretskii (eliz AT gnu DOT org) wrote: > >> Date: Thu, 04 Jun 2015 23:15:51 +0300 > >> From: "Andris Pavenis (andris DOT pavenis AT iki DOT fi)" > >> #endif /* (__STDC_VERSION__ >= 199901L) || !__STRICT_ANSI__ */ > >> > >> -#ifndef __STRICT_ANSI__ > >> +#if !defined(__STRICT_ANSI__) || defined(__cplusplus) > >> > >> #define E2BIG 3 > >> #define EACCES 4 > > > > This looks wrong: we shouldn't have errno values visible under ANSI > > compilation which are not defined by the ANSI C standard. E.g., C99 > > only defines EDOM, EILSEQ, and ERANGE. > > I do not agree. > > The purpose of --ansi (or other C dialect selectors) is to affect the > C dialect used, not the libraries (which are not even part of GCC). Its purpose is also to allow applications to use non-standard symbols for their own purposes. E.g., an application could define a function named E2BIG, or a macro that did something very different from what errno.h does. > When I use -ansi, I want GCC not to accept nonconforming extensions. A macro is always a conforming extension. > I do not want it to start hiding errno.h constants, or the declaration > of fileno in . When compiling under strict ANSI, the namespace should be free of pollution by non-ANSI symbols. DJGPP did that since day one.