Re: MISRA
Nicolas Pitre <nico@...>
On Mon, 20 Dec 2021, Abramo Bagnara wrote:
In this particular case it is extensively tested by the CI
infrastructure. In the unlikely event one compiler implementation
decides to exercise its freedom to change the existing behavior then
we'll know about it right away.
But you keep on dismissing this fact.
PS: You should have a look at tests/lib/c_lib/src/main.c. Lots of
"undefined" stuff being tested in there, including not very useful
stuff.
Nicolas
Il 19/12/21 23:36, Nicolas Pitre ha scritto:For the n-th time I'll repeat this: it can be tested.all compilers capable of compiling Zephyr I have access to do produceNo, it is not forbidden, it is in the domain "you can do what you want, but be
the right result, *all* the time. It is true whether or not the pointer
being NULL is known at compile time (when it is the compiler also does
constant propagation optimizations on it). It is not because something
is "undefined" that it is necessarily "forbidden".
prepared to pay the price" and the price is unspecified.
In this particular case it is extensively tested by the CI
infrastructure. In the unlikely event one compiler implementation
decides to exercise its freedom to change the existing behavior then
we'll know about it right away.
But you keep on dismissing this fact.
PS: You should have a look at tests/lib/c_lib/src/main.c. Lots of
"undefined" stuff being tested in there, including not very useful
stuff.
Nicolas