https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67546
--- Comment #3 from Kai Tietz <ktietz at gcc dot gnu.org> --- Thanks Rainer for pointing on this. Yes, comment wasn't intended for this bug. I added comment to proper pr ... This issue is related to the fact that msvcrt doesn't provide unsetenv (as it doesn't provide setenv). Instead all this functionality needs to be expressed via getenv/putenv instead.