On 2018-Jan-18 21:07:19 -0800, Conrad Meyer <c...@freebsd.org> wrote:
>The spec says the behavior is undefined; not that the compiler has to
>produce a warning or error message.  The compiler *does* get to
>arbitrarily decide what it wants to do when it encounters UB.  It is
>wholly free to implement this particular UB with the logical result
>and no warning/error.

IMO, the fact that our compiler produces a warning message when it
encounters undefined behaviour is A Good Thing.  Relying on
implementation-specific behaviour leads to brittle code - a compiler
update or reusing the code with a different compiler could completely
change the behaviour.

-- 
Peter Jeremy

Attachment: signature.asc
Description: PGP signature

Reply via email to