Mail Archives: djgpp/2015/06/06/09:32:21
> From: "Kaz Kylheku (kaz AT kylheku DOT com)" <djgpp AT delorie 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) <djgpp AT delorie DOT com> wrote:
> >> Date: Thu, 04 Jun 2015 23:15:51 +0300
> >> From: "Andris Pavenis (andris DOT pavenis AT iki DOT fi)" <djgpp AT delorie DOT com>
> >> #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 <stdio.h>.
When compiling under strict ANSI, the namespace should be free of
pollution by non-ANSI symbols.
DJGPP did that since day one.
- Raw text -