From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6E6893858438; Thu, 8 Jun 2023 18:05:22 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6E6893858438 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1686247522; bh=nJJp/iChB+iQweJFNf0/3ubUEWkp5u3HC/rMhAgUjYU=; h=From:To:Subject:Date:In-Reply-To:References:From; b=gzsozJpJI5smnd29zmj9882ExDEY2oP8yzpRjpoJjh6MTCXC9YopNc+ek8Q1A/O3H YRXpcCSwxejEfWjJKeNiWaAh1E+ucxyAJKbxxSaplM+6AkVk304nyWMuoBT2Q20fUz c0KVAeuoJrMnZIHMm7I4fbRe1u5lbpMLj5gKJE7c= From: "mpolacek at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/110175] [GCC][Crash] GCC Crash on valid code Date: Thu, 08 Jun 2023 18:05:21 +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: 14.0 X-Bugzilla-Keywords: c++-lambda, diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: mpolacek at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: mpolacek at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: assigned_to bug_status cf_reconfirmed_on cc everconfirmed 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D110175 Marek Polacek changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|unassigned at gcc dot gnu.org |mpolacek at gcc dot= gnu.org Status|UNCONFIRMED |ASSIGNED Last reconfirmed| |2023-06-08 CC| |mpolacek at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #1 from Marek Polacek --- Confirmed. --- a/gcc/cp/typeck.cc +++ b/gcc/cp/typeck.cc @@ -7561,7 +7561,8 @@ cp_build_unary_op (enum tree_code code, tree xarg, bo= ol noconvert, /* [depr.volatile.type] "Postfix ++ and -- expressions and prefix ++ and -- expressions of volatile-qualified arithmetic and pointer types are deprecated." */ - if (TREE_THIS_VOLATILE (arg) || CP_TYPE_VOLATILE_P (TREE_TYPE (arg))) + if ((TREE_THIS_VOLATILE (arg) || CP_TYPE_VOLATILE_P (TREE_TYPE (arg))) + && (complain & tf_warning)) warning_at (location, OPT_Wvolatile, "%qs expression of %-qualified type is " "deprecated", @@ -7592,7 +7593,7 @@ cp_build_unary_op (enum tree_code code, tree xarg, bo= ol noconvert, return error_mark_node; } /* Otherwise, [depr.incr.bool] says this is deprecated. */ - else + else if (complain & tf_warning) warning_at (location, OPT_Wdeprecated, "use of an operand of type %qT " "in % is deprecated",=