From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 07565385803B; Sat, 2 Dec 2023 11:16:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 07565385803B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1701515797; bh=8HBvsux2NEYSC/XQ83sqO153iKJKjla79n1fT1m0TEw=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Co5z43JcfKP2hiWNkFxHrNXMEQBWHrZdXYdPt3dzPvJMmmBBr8TFhscEzZfDotpdz IsvYJ5rSKMyYZH9vQyRTgq1/pszlh+01orWIWDk0xDO6FBgoVgyeMo3lxEJK9jMDA1 UZBRKiTP3GCtXXjlMeKkS2rXPd3APXMk2pLFSnLs= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/60994] gcc does not recognize hidden/shadowed enumeration as valid nested-name-specifier Date: Sat, 02 Dec 2023 11:16:35 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 5.0 X-Bugzilla-Keywords: rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 6.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D60994 --- Comment #19 from GCC Commits --- The master branch has been updated by Roger Sayle : https://gcc.gnu.org/g:193ef02a7f4f3e5349ad9cf8d3d4df466a99b677 commit r14-6075-g193ef02a7f4f3e5349ad9cf8d3d4df466a99b677 Author: Roger Sayle Date: Sat Dec 2 11:15:14 2023 +0000 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 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.=