On Tue, 4 Aug 2015, Ed Schouten wrote:
2015-08-04 20:23 GMT+02:00 Warner Losh <i...@bsdimp.com>:
There???s at least one compiler in common use that warns about
extern int fred[1];
extern int fred[1];
being a repeated declaration (despite being legal C).
Would you happen to know which one that is?
All non-broken compilers warn about this when directed to do so by
-Wredundant-decls. I think -Wno-system-headers turns this off, but
we use -Wsystem-headers so as to see bugs in our system headers.
clang is broken and doesn't even warn that it ignores -Wredundant-decls.
We use -Wredundant-decls at WARNS >= 6. We used to use it always in the
kernel, but now we turn it and most other warnings off in cddl code.
We use -Wsystem-headers at WARNS >= 1. We don't use it explicitly in
the kernel. That might be a bug. The kernel uses nonstandard include
paths, but so does userland for bootstrapping and cross compiling.
The kernel also uses -nostdinc and that should kill any idea that the
kernel has about which headers are system ones. Makeworld doesn't
seem to use -nostdinc. That might be another bug. It uses lots of
-I paths, but there is still a possibility of getting host headers
mixed with target ones. cddl has different messes for -nostdinc. It
seems to duplicate it together with spamming CFLAGS with lots of -I's.
Bruce
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"