On Thu, May 05, 2022 at 02:31:05PM +0200, Martin Liška wrote: > Some parts of the compiler already define: > #define likely(cond) __builtin_expect ((cond), 1) > > So the patch should unify it. > > Patch can bootstrap on x86_64-linux-gnu and survives regression tests. > > Ready to be installed? > Thanks, > Martin > > gcc/c/ChangeLog: > > * c-parser.cc (c_parser_conditional_expression): Use {,UN}LIKELY > macros. > (c_parser_binary_expression): Likewise. > > gcc/cp/ChangeLog: > > * cp-gimplify.cc (cp_genericize_r): Use {,UN}LIKELY > macros. > * parser.cc (cp_finalize_omp_declare_simd): Likewise. > (cp_finalize_oacc_routine): Likewise.
That's funny, yesterday I added another one: cp/parser.cc:cp_parser_init_declarator which is not replaced in this patch. I would've preferred the name gcc_{,un}likely but I don't want to start a long bikeshedding... Thanks, Marek