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++/106937] [10/11/12/13 Regression] ICE tree check: expected identifier_node, have tree_list in pp_tree_identifier, at tree-pretty-print.cc:4606 since r10-1214-g1bf32c1141e23074
Date: Mon, 10 Oct 2022 19:35:05 +0000	[thread overview]
Message-ID: <bug-106937-4-qPxQhN6LUI@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-106937-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106937

--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The trunk branch has been updated by Marek Polacek <mpolacek@gcc.gnu.org>:

https://gcc.gnu.org/g:67efffec943656a509e036cd3c785a5c3d6885e1

commit r13-3202-g67efffec943656a509e036cd3c785a5c3d6885e1
Author: Marek Polacek <polacek@redhat.com>
Date:   Thu Sep 29 17:49:32 2022 -0400

    c-family: ICE with [[gnu::nocf_check]] [PR106937]

    When getting the name of an attribute, we ought to use
    get_attribute_name, which handles both [[]] and __attribute__(())
    forms.  Failure to do so may result in an ICE, like here.

    pp_c_attributes_display wasn't able to print the [[]] form of
    attributes, so this patch teaches it to.

    When printing a pointer to function with a standard attribute, the
attribute
    should be printed after the parameter-list.  With this patch we print:

      aka 'void (*)(int) [[gnu::nocf_check]]'

    or, in C++ with noexcept:

      aka 'void (*)(int) noexcept [[gnu::nocf_check]]'

    pp_c_attributes has been unused since its introduction in r56273 so
    this patch removes it.

            PR c++/106937

    gcc/c-family/ChangeLog:

            * c-pretty-print.cc (pp_c_specifier_qualifier_list): Print only GNU
            attributes here.
            (c_pretty_printer::direct_abstract_declarator): Print the standard
[[]]
            attributes here.
            (pp_c_attributes): Remove.
            (pp_c_attributes_display): Print the [[]] form if appropriate.  Use
            get_attribute_name.  Don't print a trailing space when printing the
            [[]] form.
            * c-pretty-print.h (pp_c_attributes): Remove.

    gcc/cp/ChangeLog:

            * error.cc: Include "attribs.h".
            (dump_type_prefix): Print only GNU attributes here.
            (dump_type_suffix): Print standard attributes here.

    gcc/testsuite/ChangeLog:

            * c-c++-common/pointer-to-fn1.c: New test.

  parent reply	other threads:[~2022-10-10 19:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-13 19:37 [Bug c++/106937] New: [10/11/12/13 Regression] ICE tree check: expected identifier_node, have tree_list in pp_tree_identifier, at tree-pretty-print.cc:4606 gscfq@t-online.de
2022-09-13 20:13 ` [Bug c++/106937] [10/11/12/13 Regression] ICE tree check: expected identifier_node, have tree_list in pp_tree_identifier, at tree-pretty-print.cc:4606 since r10-1214-g1bf32c1141e23074 marxin at gcc dot gnu.org
2022-09-14  7:04 ` rguenth at gcc dot gnu.org
2022-09-15 15:41 ` mpolacek at gcc dot gnu.org
2022-10-10 19:35 ` cvs-commit at gcc dot gnu.org [this message]
2022-10-10 19:41 ` [Bug c++/106937] [10/11/12 " mpolacek 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-106937-4-qPxQhN6LUI@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: link
Be 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).