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

2022-12-16 Thread Jason Merrill via Gcc-patches
On 12/16/22 13:28, Marek Polacek wrote: Here we crash because check_function_format was using TREE_PURPOSE directly rather than using get_attribute_name. Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk? OK. PR c/98487 gcc/c-family/ChangeLog: * c-format.cc (check

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

2022-12-16 Thread Marek Polacek via Gcc-patches
Here we crash because check_function_format was using TREE_PURPOSE directly rather than using get_attribute_name. Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk? PR c/98487 gcc/c-family/ChangeLog: * c-format.cc (check_function_format): Use get_attribute_name. gcc/t