public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "mpolacek at gcc dot gnu.org" <gcc-bugzilla@gcc.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 [thread overview] Message-ID: <bug-110175-4-kiNoAjGy8f@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-110175-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110175 Marek Polacek <mpolacek at gcc dot gnu.org> 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 <mpolacek at gcc dot gnu.org> --- 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, bool 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 %<volatile%>-qualified type is " "deprecated", @@ -7592,7 +7593,7 @@ cp_build_unary_op (enum tree_code code, tree xarg, bool 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 %<operator++%> is deprecated",
next prev parent reply other threads:[~2023-06-08 18:05 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-06-08 14:28 [Bug c++/110175] New: " yronglin777 at gmail dot com 2023-06-08 18:05 ` mpolacek at gcc dot gnu.org [this message] 2023-06-09 4:13 ` [Bug c++/110175] " yronglin777 at gmail dot com 2023-06-28 15:52 ` cvs-commit at gcc dot gnu.org 2023-06-28 15:52 ` mpolacek at gcc dot gnu.org 2023-06-28 18:52 ` ppalka at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-110175-4-kiNoAjGy8f@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).