]> git.ipfire.org Git - thirdparty/gcc.git/commit
RISC-V: Improve style to work around PR 60994 in host compiler.
authorRoger Sayle <roger@nextmovesoftware.com>
Sat, 2 Dec 2023 11:15:14 +0000 (11:15 +0000)
committerRoger Sayle <roger@nextmovesoftware.com>
Sat, 2 Dec 2023 11:15:14 +0000 (11:15 +0000)
commit193ef02a7f4f3e5349ad9cf8d3d4df466a99b677
tree34eb89e10641a363181c322531e176017cfff418
parentb74981b5cf32ebf4bfffd25e7174b5c80243447a
RISC-V: Improve style to work around PR 60994 in host compiler.

This simple patch allows me to build a cross-compiler to riscv using
older versions of RedHat's system compiler.  The issue is PR c++/60994
where g++ doesn't like the same name (demand_flags) to be used by both
a variable and a (enumeration) type, which is also undesirable from a
(GNU) coding style perspective.  One solution is to rename the type
to demand_flags_t, but a less invasive change is to simply use another
identifier for the problematic local variable, renaming demand_flags
to dflags.

2023-12-02  Roger Sayle  <roger@nextmovesoftware.com>

gcc/ChangeLog
* config/riscv/riscv-vsetvl.cc (csetvl_info::parse_insn): Rename
local variable from demand_flags to dflags, to avoid conflicting
with (enumeration) type of the same name.
gcc/config/riscv/riscv-vsetvl.cc