svn commit: r328159 - head/sys/modules

Peter Jeremy peter at rulingia.com
Fri Jan 19 08:24:15 UTC 2018


On 2018-Jan-18 21:07:19 -0800, Conrad Meyer <cem at 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 963 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/svn-src-head/attachments/20180119/43f82fc9/attachment.sig>


More information about the svn-src-head mailing list