X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f X-Recipient: djgpp AT delorie DOT com Date: Mon, 30 Nov 2020 21:00:42 +0200 Message-Id: <83y2iiis9x.fsf@gnu.org> From: "Eli Zaretskii (eliz AT gnu DOT org) [via djgpp AT delorie DOT com]" To: djgpp AT delorie DOT com In-Reply-To: <24514c64-0ebf-96cc-4db6-89beb7a1fcdf@iki.fi> (djgpp@delorie.com) Subject: Re: __STRICT_ANSI__ and excluded definitions References: <24514c64-0ebf-96cc-4db6-89beb7a1fcdf AT iki DOT fi> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit 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: "Andris Pavenis (andris DOT pavenis AT iki DOT fi) [via djgpp AT delorie DOT com]" > Date: Mon, 30 Nov 2020 20:25:13 +0200 > > On 11/30/20 7:52 PM, DJ Delorie wrote: > > Best thing to do is to file a bug with gcc and let them language-lawyer > > it out. > > I mentioned as example the behavior in Linux. In this case its glibc implementation stuff not even > gcc one: > > - gcc or clang only defines __STRICT_ANSI__ > > - glibc headers causes definitions of pid_t and ino_t and other stuff not to be excluded > > Another question whether specifying for example -std=c++11 (which implies __STRICT_ANSI__) also > implies ANSI C  for used C headers. IME, no useful program can be compiled with strict ANSI, so using -std=c++11 when building a compiler is counter-productive. I'd suggest to try -std=gnu++11 instead.