[Bug c/98487] ICE: tree check: expected identifier_node, have tree_list in is_attribute_p, at attribs.h:155 [C2X or C++11 attribute syntax, gnu::format and -Wsuggest-attribute=format] or a suggest warning (release checking)

cvs-commit at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Dec 19 16:43:54 GMT 2022


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

--- Comment #6 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:68e51bd0a85794cd437d3e740357dfef84dc560d

commit r13-4796-g68e51bd0a85794cd437d3e740357dfef84dc560d
Author: Marek Polacek <polacek@redhat.com>
Date:   Fri Dec 16 12:28:43 2022 -0500

    c-family: Fix ICE with -Wsuggest-attribute [PR98487]

    Here we crash because check_function_format was using TREE_PURPOSE
    directly rather than using get_attribute_name.

            PR c/98487

    gcc/c-family/ChangeLog:

            * c-format.cc (check_function_format): Use get_attribute_name.

    gcc/testsuite/ChangeLog:

            * c-c++-common/Wsuggest-attribute-1.c: New test.


More information about the Gcc-bugs mailing list