On 10/10/2023 09.34, Philippe Mathieu-Daudé wrote:
On 10/10/23 08:04, Markus Armbruster wrote:
Philippe Mathieu-Daudé <phi...@linaro.org> writes:
[...]
If we have to clean that for -Wshadow=global, I'm tempted to rename
the typedef as 'vaddr_t' and keep the 'vaddr' variable names.
POSIX reserves suffix _t, see
https://pubs.opengroup.org/onlinepubs/9699919799/functions/V2_chap02.html#tag_15_02_02
Alternatives: tvaddr, VAddr, TargetVirtualAddress.
Naming is hard.
Do we care?
According to our docs/devel/style.rst :
"Scalar type
names are lower_case_with_underscores_ending_with_a_t, like the POSIX
uint64_t and family. Note that this last convention contradicts POSIX
and is therefore likely to be changed."
Maybe this would be a good point in time now to revisit our coding style,
update it and then to change the "vaddr" type accordingly?
My 0.02 €: If enum types should already be in CamelCase, why not also use
that for scalar types? So I'd vote for VirtAddr or VAddr here.
Thomas