From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 3D152385803C; Tue, 19 Oct 2021 17:30:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3D152385803C From: "msebor at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug bootstrap/102828] [12 Regression] ODR violation in gimple-predicate-analysis.h since g:94c12ffac234 Date: Tue, 19 Oct 2021 17:30:23 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: bootstrap X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: msebor at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 12.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Oct 2021 17:30:23 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D102828 Martin Sebor changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hubicka at gcc dot gnu.org --- Comment #2 from Martin Sebor --- Both classes are defined in a header and used in .c/.cc files so they both = need to be public. One either needs to be renamed or put in some namespace. The predicate defined in ipa-predicate.h is used by IPA (ipa-fnsummary.c and ipa-predicate.c), the one in gimple-predicate-analysis.h only by -Wuninitialized for now (tree-ssa-uninit.c) with the goal of being used by other middle end warnings in the future.=20 It would be easier for me to rename the one in gimple-predicate-analysis.h = but I'm not coming up with a good name. On the other hand, it seems that the o= ne in ipa-predicate.h could well be named ipa_predicate. Wrapping all IPA typ= es and functions in their own namespace (like ipa) seems even more appealing t= o me but it would be a lot of churn, probably too much at this point. Honza, your thoughts/preference?=