From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C8FB93858D38; Wed, 12 Aug 2020 17:48:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C8FB93858D38 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1597254486; bh=zAUOXYboGVh1Hwu67wLRarFsc+90GL29evMM7jp2X/g=; h=From:To:Subject:Date:From; b=VRbcrGFUhZZzGSMTIFUyVzVBi25tElhiNg2uFpSzGuLl96h/mO/xKKgF1ggHdMVcg 20TRe9hl26CjkUfUhTh0rmY57wAhTwxmX10phn+ly0aULkX97Y/wCriDi9Jc0viyCy zdSF0J3oyAZ7zVb2Z11E2fcdji/J3lWMa9zg4IZ0= From: "language.lawyer at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/96593] New: No "declaration changes meaning" diagnostic for alias templates Date: Wed, 12 Aug 2020 17:48:06 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 11.0 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: language.lawyer 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: bug_id short_desc product version bug_status keywords bug_severity priority component assigned_to reporter target_milestone Message-ID: 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: Wed, 12 Aug 2020 17:48:06 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D96593 Bug ID: 96593 Summary: No "declaration changes meaning" diagnostic for alias templates Product: gcc Version: 11.0 Status: UNCONFIRMED Keywords: diagnostic Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: language.lawyer at gmail dot com Target Milestone: --- "A name N used in a class S shall refer to the same declaration in its cont= ext and when re-evaluated in the completed scope of S. No diagnostic is required for a violation of this rule." The diagnostic for the rule is not required, but since GCC diagnoses some of the cases, there is a bugreport about missing diagnostic cases (bug 46983),= and the check might become mandatory (will it?), I'd like file this bug. GCC accepts the code with alias templates: struct S {}; template struct T {}; struct U { template using S =3D S; template using T =3D T; }; but produces the "declaration changes meaning" error for type aliases. GCC also diagnoses the case if the "outer" declaration is used before the corresponding alias template: struct S {}; struct U { S s; template using S =3D S; // error: declaration of ... changes meaning of 'S' }; (From https://stackoverflow.com/q/63369264/)=