Re: [PATCH] c: Avoid -Wenum-int-mismatch warning for redeclaration of builtin acc_on_device [PR107041]

2023-04-20 Thread Marek Polacek via Gcc-patches
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 w

Re: [PATCH] c: Avoid -Wenum-int-mismatch warning for redeclaration of builtin acc_on_device [PR107041]

2023-04-20 Thread Jakub Jelinek via Gcc-patches
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"

Re: [PATCH] c: Avoid -Wenum-int-mismatch warning for redeclaration of builtin acc_on_device [PR107041]

2023-04-20 Thread Marek Polacek via Gcc-patches
On Wed, Apr 19, 2023 at 11:02:53AM +0200, Jakub Jelinek wrote: > Hi! > > The new -Wenum-int-mismatch warning triggers with -Wsystem-headers in > , for obvious reasons the builtin acc_on_device uses int > type argument rather than enum which isn't defined yet when the builtin > is created, while th

[PATCH] c: Avoid -Wenum-int-mismatch warning for redeclaration of builtin acc_on_device [PR107041]

2023-04-19 Thread Jakub Jelinek via Gcc-patches
Hi! The new -Wenum-int-mismatch warning triggers with -Wsystem-headers in , for obvious reasons the builtin acc_on_device uses int type argument rather than enum which isn't defined yet when the builtin is created, while the OpenACC spec requires it to have acc_device_t enum argument. The header