From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 877A63858408; Fri, 7 Jan 2022 02:35:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 877A63858408 From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/95724] error message could be improved in the cascading error case Date: Fri, 07 Jan 2022 02:35:09 +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: diagnostic X-Bugzilla-Severity: enhancement X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: NEW 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_status short_desc everconfirmed cf_reconfirmed_on bug_severity 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: Fri, 07 Jan 2022 02:35:09 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D95724 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Summary|bogue error : "expected '{' |error message could be |before ')' token" |improved in the cascading | |error case Ever confirmed|0 |1 Last reconfirmed| |2022-01-07 Severity|normal |enhancement --- Comment #8 from Andrew Pinski --- I don't like the error messages from any of the other compilers I tried eit= her: clang: :2:29: error: use of undeclared identifier 'a' template <(union : decltype(a =3D 0)>) ^ :2:36: error: expected '{' after base class list template <(union : decltype(a =3D 0)>) ^ :2:12: error: '(unnamed union at :2:12)' cannot be defined = in a parameter type template <(union : decltype(a =3D 0)>) ^ :2:37: error: expected template parameter template <(union : decltype(a =3D 0)>) ^ :2:37: error: expected ',' or '>' in template-parameter-list :2:37: error: expected unqualified-id MSVC: (2): error C2059: syntax error: '(' (2): error C2947: expecting '>' to terminate template-parameter-lis= t, found '>' (2): error C2059: syntax error: ')' (3): fatal error C1004: unexpected end-of-file found ICC: (2): error: expected a type specifier template <(union : decltype(a =3D 0)>) ^ (2): error: expected a "," or ">" (2): error: expected a declaration (2): error: expected a ";" compilation aborted for (code 2)=