Re: [hatari-devel] 68030 and movem

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


Hi,

I think it's considered good practice to always initialise variables
these days.  Getting into that habit prevents you from having to worry
about uninitialised memory reads.  We end up doing that at work to
prevent static analysis tools from flagging it.  Reducing the scope of
variables can prevent the need for pointless initialisation as well,
i.e. don't declare the variable until you actually have a value for
it.  The practice of declaring all variables at the top of a function
dates back to ancient C compilers which mandated that.

Cheers,

Robin.


On Mon, 18 Sept 2023 at 09:46, Andreas Grabher <andreas_g86@xxxxxxxxxx> wrote:

> That is likely. But why do we add code just to optimize it away afterwards? At least it is bad for readability.
>



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/