From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 26A423860750; Wed, 14 Feb 2024 22:28:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 26A423860750 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1707949726; bh=pqID3qiPG27o/DDSEITXnllwZWpDvDnhynTjCwSyZTY=; h=From:To:Subject:Date:From; b=hZ/qlHJjCtcQ+tiXaeL36DGDnmZbibRj4I0ipz5qdfASIc7Q5zZKsmkp+TDPnrZJF vr4NUZ00hi76SzqsrTXMooJnxuOxFlEgi+zKjy/5JcKluoTBnBFvCzW2oQG0Ar37GC GjJBSNWF+lSL0bcRdqkj4lWfdrwKUFzjSeyHrVlE= From: "mpolacek at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/113924] New: worse diagnostic for invalid decltype since r10-5347 Date: Wed, 14 Feb 2024 22:28:45 +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: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: mpolacek at gcc dot gnu.org 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D113924 Bug ID: 113924 Summary: worse diagnostic for invalid decltype since r10-5347 Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: mpolacek at gcc dot gnu.org Target Milestone: --- int m () =3D delete; void f (int i, int =3D decltype (m()){ }) { } void f2 (int i, int =3D decltype(x){ }) { } used to say /home/mpolacek/w.C:4:29: error: use of deleted function =E2=80=98int m()=E2= =80=99 4 | f (int i, int =3D decltype (m()){ }) | ^ /home/mpolacek/w.C:1:5: note: declared here 1 | int m () =3D delete; | ^ /home/mpolacek/w.C:4:29: error: use of deleted function =E2=80=98int m()=E2= =80=99 4 | f (int i, int =3D decltype (m()){ }) | ^ /home/mpolacek/w.C:1:5: note: declared here 1 | int m () =3D delete; | ^ /home/mpolacek/w.C:9:27: error: =E2=80=98x=E2=80=99 was not declared in thi= s scope 9 | f2 (int i, int =3D decltype(x){ }) | ^ /home/mpolacek/w.C:9:27: error: =E2=80=98x=E2=80=99 was not declared in thi= s scope which still duplicated the errors, but now we say: /home/mpolacek/w.C:4:29: error: use of deleted function =E2=80=98int m()=E2= =80=99 4 | f (int i, int =3D decltype (m()){ }) | ^ /home/mpolacek/w.C:1:5: note: declared here 1 | int m () =3D delete; | ^ /home/mpolacek/w.C:4:29: error: use of deleted function =E2=80=98int m()=E2= =80=99 4 | f (int i, int =3D decltype (m()){ }) | ^ /home/mpolacek/w.C:1:5: note: declared here 1 | int m () =3D delete; | ^ /home/mpolacek/w.C:4:17: error: expected primary-expression before =E2=80= =98decltype=E2=80=99 4 | f (int i, int =3D decltype (m()){ }) | ^~~~~~~~~~~~~ /home/mpolacek/w.C:4:17: error: expected =E2=80=98,=E2=80=99 or =E2=80=98..= .=E2=80=99 before =E2=80=98decltype=E2=80=99 /home/mpolacek/w.C:4:34: error: expected unqualified-id before =E2=80=98)= =E2=80=99 token 4 | f (int i, int =3D decltype (m()){ }) | ^ /home/mpolacek/w.C:9:27: error: =E2=80=98x=E2=80=99 was not declared in thi= s scope 9 | f2 (int i, int =3D decltype(x){ }) | ^ /home/mpolacek/w.C:9:27: error: =E2=80=98x=E2=80=99 was not declared in thi= s scope /home/mpolacek/w.C:9:18: error: expected primary-expression before =E2=80= =98decltype=E2=80=99 9 | f2 (int i, int =3D decltype(x){ }) | ^~~~~~~~~~ /home/mpolacek/w.C:9:18: error: expected =E2=80=98,=E2=80=99 or =E2=80=98..= .=E2=80=99 before =E2=80=98decltype=E2=80=99 /home/mpolacek/w.C:9:32: error: expected unqualified-id before =E2=80=98)= =E2=80=99 token 9 | f2 (int i, int =3D decltype(x){ }) | ^ and that's even worse.=