From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 5C4DE385780B; Thu, 15 Oct 2020 08:06:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5C4DE385780B From: "peifeng2005 at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/97432] Casting away constness in the drafts [conv.qual] a cv-decomposition exists in the following examples but fails in gcc Date: Thu, 15 Oct 2020 08:06:46 +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: 11.0 X-Bugzilla-Keywords: rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: peifeng2005 at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- 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 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: Thu, 15 Oct 2020 08:06:46 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D97432 --- Comment #2 from Ray Zhang --- Hi, I actually spoke with Richard Smith about the same ticket (since clang = was also involved in the comparison here), and I found that if we were conformi= ng to the draft, the first case should also fail to compile. The discussion is linked [here](https://bugs.llvm.org/show_bug.cgi?id=3D47848). The issue now is that passing -pedantic-errors into GCC still allows for the first case to pass. This shouldn't work since we find one such qual conv to fail (const int vs. int).=