https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114042
--- Comment #5 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jakub Jelinek <ja...@gcc.gnu.org>: https://gcc.gnu.org/g:77576915cfd26e603aba5295dfdac54a5545f5f2 commit r14-9184-g77576915cfd26e603aba5295dfdac54a5545f5f2 Author: Jakub Jelinek <ja...@redhat.com> Date: Mon Feb 26 16:30:16 2024 +0100 c: Improve some diagnostics for __builtin_stdc_bit_* [PR114042] The PR complains that for the __builtin_stdc_bit_* "builtins" the diagnostics doesn't mention the name of the builtin the user used, but instead __builtin_{clz,ctz,popcount}g instead (which is what the FE immediately lowers it to). The following patch repeats the checks from check_builtin_function_arguments which are there done on BUILT_IN_{CLZ,CTZ,POPCOUNT}G, such that they diagnose it with the name of the "builtin" user actually used before it is gone. 2024-02-26 Jakub Jelinek <ja...@redhat.com> PR c/114042 * c-parser.cc (c_parser_postfix_expression): Diagnose __builtin_stdc_bit_* argument with ENUMERAL_TYPE or BOOLEAN_TYPE type or if signed here rather than on the replacement builtins in check_builtin_function_arguments. * gcc.dg/builtin-stdc-bit-2.c: Adjust testcase for actual builtin names rather than names of builtin replacements.