On Friday, 5 February 2016 at 00:56:16 UTC, Chris Wright wrote:
True. That works if this is baked into your compiler, or if your compiler has plugin support. And you'd have to compile with this plugin or the relevant options turned on by default in order for you not to duplicate work.

On Friday, 5 February 2016 at 00:56:28 UTC, Ola Fosheim Grøstad wrote:
Not sure what you mean by adding a warning. You can probably find sanitizers that do it, but the standard does not require warnings for anything (AFAIK). That is up to compiler vendors.

Quoting myself (emphasis added):

On Thursday, 4 February 2016 at 22:57:00 UTC, tsbockman wrote:
Actually, I'm surprised that this works even in C - I would have expected at least a COMPILER (or linker?) warning; this seems like it should be easy to detect automatically.

All along I have been saying this is something that *compilers* should warn about. As far as I can recall, I never suggested using linters, sanitizers, changing the C standard - or even compiler plugins.

(I did suggest the linker as an alternative, but you all have already explained why that can't work for C.)

Reply via email to