Contributing new gcc targets: i386-*-dragonfly and x86-64-*-dragonfly

Joseph S. Myers joseph@codesourcery.com
Thu May 1 23:03:00 GMT 2014


The include of <sys/types.h> from <stddef.h> seems risky, given that 
that's a POSIX header that typically defines various types ISO C does not 
permit to be defined in <stddef.h> (ISO C does not have any general *_t 
namespace reservation, unlike POSIX).

Have you verified that if you include <stddef.h> with -std=c90 / -std=c99 
/ -std=c11, the resulting definitions (compiler and preprocessor) are all 
ones permitted by the relevant C standard version to be provided by 
<stddef.h>?

(I don't know what the FreeBSD <sys/_types.h> defines, but it at least 
seems possible from the name that it is only defining things in the 
implementation namespace, with the public <sys/types.h> being what then 
includes <sys/_types.h> and does "typedef __foo_t foo_t;" or similar to 
provide the public POSIX types that aren't in ISO C.)

-- 
Joseph S. Myers
joseph@codesourcery.com



More information about the Gcc-patches mailing list