Date: Wed, 25 Sep 2019 07:38:52 +1000 (EST) From: Bruce Evans <brde@optusnet.com.au> To: Randall Stewart <rrs@freebsd.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r352661 - head/sys/netinet/tcp_stacks Message-ID: <20190925070207.Y3271@besplex.bde.org> In-Reply-To: <201909242036.x8OKahnv021758@repo.freebsd.org> References: <201909242036.x8OKahnv021758@repo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 24 Sep 2019, Randall Stewart wrote: > Log: > lets put (void) in a couple of functions to keep older platforms that > are stuck with gcc happy (ppc). The changes are needed in both bbr and > rack. You mean "Don't use K&R declarations. clang is too broken to warn about K&R declarations even when requested to do so using -Wstrict-prototypes, but some archss (e.g., ppc) haven't been downgraded to use clang yet, so K&R declarations in kernel code are still detected in FreeBSD eventually. WERROR was recently broken for gcc-4.2 by making warnings not fatal, so the changes are not strictly needed. I use gcc-4.2 on x86 for all except about 10 files with ifuncs, and the broken WERROR causes serious problems: gcc-4.2 doesn't support ifuncs, so I have to downgrade to clang to compile files with ifuncs. ifuncs only generate warnings and this used to be fatal, so files ifuncs were easy to find. Now, garbage object files are created and the errors are obscure linkage errors. Of course, I fix this by restoring WERROR=-Werror. This clearly shows the bitrot that tcp_lro.c doesn't compile. It has casts of pointers uint64_t instead of to uintptr_t. On i386, these types have different sizes, so gcc detects the type mismatch. clang is too broken to report this type mismatch. The upcast happens to be safe on x86 but gcc's warning is good for portability (source portability to compilers that detect the type mismatch in some way, and binary portabiily to future arches with pointers larger than uint64_t). Bruce
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20190925070207.Y3271>