mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 10:11:27 +01:00
In macros it is common to declare local variables using typeof(param) in order to ensure that side effects are only evaluated once. A consequence of this is double textural expansion of the parameter, which can get out of hand very quickly with nested macros. In C23, the auto keyword has been repurposed to perform type inference. A GCC extension, __auto_type, is now available in the new toolchain baseline and avoids the double textural expansion. Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> Reviewed-by: Nicola Vetrini <nicola.vetrini@bugseng.com> Reviewed-by: Frediano Ziglio <frediano.ziglio@cloud.com>