https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83826
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |RESOLVED
Resolution|--- |INVALID
--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
So stdint.h here ginclude/stdint-wrap.h:
```
#ifndef _GCC_WRAP_STDINT_H
#if __STDC_HOSTED__
# if defined __cplusplus && __cplusplus >= 201103L
# undef __STDC_LIMIT_MACROS
# define __STDC_LIMIT_MACROS
# undef __STDC_CONSTANT_MACROS
# define __STDC_CONSTANT_MACROS
# endif
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wpedantic" // include_next
# include_next <stdint.h>
#pragma GCC diagnostic pop
#else
# include "stdint-gcc.h"
#endif
#define _GCC_WRAP_STDINT_H
#endif
```
__STDC_HOSTED__ is not defined because of ffreestanding which then includes
stdint-gcc.h.
But later on sys/time.h will cause to include parts of netbsd's stdint.h.
That is if you use -ffreestanding you can't use netbsd's headers too. Maybe
-ffreestanding should imply nostdinc but the problem is really in netbsd
headers that partialy use sys/stdint.h and partly stdint.h. And not really a
GCC issue.
Note it is NOT an issue with fixinclude of sys/time.h here either but rather
dealing with stdint.h.