On Tue, Jul 22 2025, Sebastian Ott <seb...@redhat.com> wrote: > On Mon, 21 Jul 2025, Cornelia Huck wrote: >> +/* pretty-print a KVM register */ >> +#define CP_REG_ARM64_SYSREG_OP(_reg, _op) \ >> + ((uint8_t)((_reg & CP_REG_ARM64_SYSREG_ ## _op ## _MASK) >> \ >> + CP_REG_ARM64_SYSREG_ ## _op ## _SHIFT)) >> + >> +#define PRI_CP_REG_ARM64_SYSREG(_reg) \ >> + ({ \ >> + char _out[32]; \ >> + snprintf(_out, sizeof(_out), \ >> + "op0:%d op1:%d crn:%d crm:%d op2:%d", \ >> + CP_REG_ARM64_SYSREG_OP(_reg, OP0), \ >> + CP_REG_ARM64_SYSREG_OP(_reg, OP1), \ >> + CP_REG_ARM64_SYSREG_OP(_reg, CRN), \ >> + CP_REG_ARM64_SYSREG_OP(_reg, CRM), \ >> + CP_REG_ARM64_SYSREG_OP(_reg, OP2)); \ >> + _out; \ >> + }) > > Gcc correctly complains about a dangling pointer here.
Hum, I maybe should switch to a system with a less ancient compiler... thanks for testing.