-Wcast-qual Re: [PATCHES v4] Another round of FreeBSD developer build fixes

Uri Simchoni uri at samba.org
Sat Nov 25 13:52:00 UTC 2017

On 11/25/2017 02:02 PM, Stefan Metzmacher wrote:
>>>> I would like some broader comment on:
>>>> [PATCH v4 08/13] build: remove -Wcast-align from developer build
> Please don't remove -Wcast-align! The following should allow the build:
> ADDITIONAL_CFLAGS="-Wno-error=cast-align" ./configure.developer
> --picky-developer
It's possible of course. My aim has been to succeed without having to
add flags for a native build on a rather mainstream OS.

I would appreciate some reasoning added to not removing this flag, esp
after I've explained in a rather longish way why IMO this flag either
does nothing, or breaks the build (depending on platform).

> We use something similar with -Wno-error=deprecated-declarations.
> metze

Andrew, Re: what misalignment causes - on Linux it's configurable
through /proc/cpu/alignment, and there's an option for the kernel to fix
it up. In ARM/MIPS projects I was involved with, we would set it to send
a SIGBUG, not wanting to live with broken code.


More information about the samba-technical mailing list