lmi
[Top][All Lists]
Advanced

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

[lmi] __STRICT_ANSI__ patch[Was: PATCH: Switch to using std::filesystem]


From: Greg Chicares
Subject: [lmi] __STRICT_ANSI__ patch[Was: PATCH: Switch to using std::filesystem]
Date: Wed, 28 Apr 2021 10:49:01 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.9.0

On 4/26/21 9:53 PM, Vadim Zeitlin wrote:
[...]
>  BTW, please note that that this
[..."this" == filesystem...]
> patch and the other recently submitted
> ones, fixing the build with clang 12[†] and gcc 11[‡], respectively, can be
> applied in any order, i.e. this patch doesn't depend on them, and neither
> do they depend on it.
> 
> [†]: https://lists.nongnu.org/archive/html/lmi/2021-04/msg00046.html

[replied to separately]

> [‡]: https://lists.nongnu.org/archive/html/lmi/2021-04/msg00047.html
|  Don't undefine __STRICT_ANSI__ before including libstdc++ headers

Applied and pushed. Sometime, ages ago I'd guess, gcc's system
headers defectively conditionalized some function prototypes
on this macro, so that putenv() (e.g.) and standard C were
mutually exclusive. I devised an abusive workaround, which is
now forbidden by gcc-11. The defect in the system headers
having been removed, there's no need for the workaround.

Having invested so much effort in the workaround, I considered
whether there was any value in preserving its substance as
comments--at least this part, which makes the point clearly:

// the following strictly-conforming program (C99 4/6):
//
//   #include <stdlib.h>
//   void foo(void);
//   int main() {foo(); return 0;}
//
// and replace 'foo' with 'putenv', which latter name the language
// standard clearly does not reserve.

but I concluded that quoting that here where it's searchable
is sufficient.



reply via email to

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