public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/97197] With -O2, Incorrect -Werror=maybe-uninitialized thrown, leads to 'target_mem_ref' and 'dump_expr<expression error>' in message Date: Fri, 16 Oct 2020 11:37:29 +0000 [thread overview] Message-ID: <bug-97197-4-v21N6df38B@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-97197-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97197 --- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-10 branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>: https://gcc.gnu.org/g:7790a71c07029546110a039f47611dfa967adc51 commit r10-8900-g7790a71c07029546110a039f47611dfa967adc51 Author: Jakub Jelinek <jakub@redhat.com> Date: Mon Oct 5 18:33:17 2020 +0200 support TARGET_MEM_REF in C/C++ error pretty-printing [PR97197] > See my comment above for Martins attempts to improve things. I don't > really want to try decide what to do with those late diagnostic IL > printing but my commit was blamed for showing target-mem-ref unsupported. > > I don't have much time to spend to think what to best print and what not, > but yes, printing only the MEM_REF part is certainly imprecise. Here is an updated version of the patch that prints TARGET_MEM_REF the way it should be printed - as C representation of what it actually means. Of course it would be better to have the original expressions, but with the late diagnostics we no longer have them. 2020-10-05 Richard Biener <rguenther@suse.de> Jakub Jelinek <jakub@redhat.com> PR c++/97197 gcc/cp/ * error.c (dump_expr): Handle TARGET_MEM_REF. gcc/c-family/ * c-pretty-print.c: Include langhooks.h. (c_pretty_printer::postfix_expression): Handle TARGET_MEM_REF as expression. (c_pretty_printer::expression): Handle TARGET_MEM_REF as unary_expression. (c_pretty_printer::unary_expression): Handle TARGET_MEM_REF. (cherry picked from commit ac1c65ad1a16d83ec63674efa07c00b062562f15)
next prev parent reply other threads:[~2020-10-16 11:37 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-09-24 15:43 [Bug c++/97197] New: " davidfink314 at gmail dot com 2020-09-25 8:00 ` [Bug c++/97197] " marxin at gcc dot gnu.org 2020-09-25 11:14 ` rguenth at gcc dot gnu.org 2020-09-25 13:47 ` jakub at gcc dot gnu.org 2020-09-25 14:50 ` davidfink314 at gmail dot com 2020-10-05 16:42 ` cvs-commit at gcc dot gnu.org 2020-10-16 11:37 ` cvs-commit at gcc dot gnu.org [this message] 2021-04-13 20:10 ` msebor 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-97197-4-v21N6df38B@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).