On 2024-05-24 03:55, Bruno Haible wrote:
It is not spam. It is fully justified, since in putenv ((char []) {"TEST_VAR=abc"}) the argument is allocated in automatic storage. See ISO C § 6.5.2.5.(12).
Well, to be fair, the test program removed the string from the environment before 'main' returned, so there was no violation of ISO C unless the tests fail (and if the tests fail the implementation doesn't agree with GNU and all bets are off anyway). I.e., the warning was a false positive, although an understandable one.
Anyway, thanks for pacifying GCC.