On Thu, Apr 20, 2023 at 07:24:29PM +0200, Jakub Jelinek wrote: > On Thu, Apr 20, 2023 at 12:48:57PM -0400, Marek Polacek wrote: > > > - else if (enum_and_int_p && TREE_CODE (newdecl) != TYPE_DECL) > > > + else if (enum_and_int_p > > > + && TREE_CODE (newdecl) != TYPE_DECL > > > + /* Don't warn about about acc_on_device builtin redeclaration, > > > > "built-in" > > > > > + the builtin is declared with int rather than enum because > > > > "built-in" > > Changing. > > > > > + the enum isn't intrinsic. */ > > > + && !(TREE_CODE (olddecl) == FUNCTION_DECL > > > + && fndecl_built_in_p (olddecl, BUILT_IN_ACC_ON_DEVICE) > > > + && !C_DECL_DECLARED_BUILTIN (olddecl))) > > > > What do you think about adding an (UN)LIKELY here? This seems a rather > > very special case. On the other hand we're not on a hot path here so it > > hardly matters. > > If anything, I'd add it either as UNLIKELY (enum_and_int_p) because that > whole thing is unlikely,
Might could as well. > or add UNLIKELY (flag_openacc) && before this > acc_on_device stuff (but then users of -fopenacc might complain that it is > likely for them). Ok. Marek