From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 75604396EC28; Fri, 25 Sep 2020 08:05:20 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 75604396EC28 From: "tangyixuan at mail dot dlut.edu.cn" To: gcc-bugs@gcc.gnu.org Subject: =?UTF-8?B?W0J1ZyBjKysvOTcyMDJdIE5ldzogR0NDIHJlcG9ydHMgYW4gZXJy?= =?UTF-8?B?b3I6IGV4cGVjdGVkIHVucXVhbGlmaWVkLWlkIGJlZm9yZSDigJhzaG9ydA==?= =?UTF-8?B?4oCZ?= Date: Fri, 25 Sep 2020 08:05:20 +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: X-Bugzilla-Severity: normal X-Bugzilla-Who: tangyixuan at mail dot dlut.edu.cn 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 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: Fri, 25 Sep 2020 08:05:20 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D97202 Bug ID: 97202 Summary: GCC reports an error: expected unqualified-id before =E2=80=98short=E2=80=99 Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: tangyixuan at mail dot dlut.edu.cn Target Milestone: --- Hi, GCC 11 rejects the following code when the class 'A' is instantiated. = When I fed it into GCC 1O, it is accepted. Also, clang accepts it. I guess maybe= it is valid. $ cat s.cpp template class A {=20 public: A(short,short a=3D0) {} A(short b) {} }; $ g++ -c s.cpp s.cpp:4:10: error: expected unqualified-id before =E2=80=98short=E2=80=99 4 | A(short b) {} | ^~~~~ s.cpp:4:10: error: expected =E2=80=98)=E2=80=99 before =E2=80=98short=E2=80= =99 4 | A(short b) {} | ~^~~~~ | ) $ g++ -v Using built-in specs. COLLECT_GCC=3D/usr/local/gcc-20200920/bin/g++ COLLECT_LTO_WRAPPER=3D/usr/local/gcc-20200920/libexec/gcc/x86_64-pc-linux-g= nu/11.0.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: ../gcc-11-20200920/configure --prefix=3D/usr/local/gcc-202= 00920 --enable-checking=3Drelease --enable-languages=3Dc,c++ --disable-multilib Thread model: posix Supported LTO compression algorithms: zlib gcc version 11.0.0 20200920 (experimental) (GCC)=