Re: [hatari-devel] 68030 and movem |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/hatari-devel Archives
]
- To: hatari-devel@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [hatari-devel] 68030 and movem
- From: Robin Sergeant <robin.sergeant@xxxxxxxxx>
- Date: Mon, 18 Sep 2023 10:00:18 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1695027630; x=1695632430; darn=lists.tuxfamily.org; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=nXBNWylX3sdiCwvAJ0nNCwbJPDQZr+5eC5+rMWTO5Lw=; b=TNoRs8vRWnw0ZHvonnBAmtv15BPTVGq3qb6NwNDK0vedOqWctmqJs3YyliVkGr6DOI /Eu9GLqfTWXRXwc48r5fHq3I8n9gIDmUrQqVZkkuoTIqRCg3k1gop1bS9aXptM8mKoU2 6SvDJObUAA99QEeisYRT94C0krA8bwoStSvM2tbAxoLykBJJBbsuX5E4JjD0RPIFpRdv cNAq463bp9yW2bhFzEIpZXaF+5YbUlgW2MPmCnqCxQtSBmB/EaHNyzBnlhvcrN4yOj1j TVe95h555uWnJzqnVoA402E2zz7p+zNeWhfCIG9xcidXPZcJkH6uC7YGxLm7fsakEYVT 9VXQ==
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.
>