Re: [PATCH] linux/find: ignore -Wtype-limits to reduce W=2 warnings by 34% tree-wide

2022-04-27 Thread Vincent MAILHOL
On Wed. 27 Apr 2022 at 23:04, Yury Norov wrote: > On Wed, Apr 27, 2022 at 11:58:58AM +0900, Vincent MAILHOL wrote: > > + Alexander Lobakin > > > > On Wed. 27 Apr 2022 at 05:42, Yury Norov wrote: > > > + gcc@gcc.gnu.org > > > + Rikard Falkeborn > > > > > > On Wed, Apr 27, 2022 at 01:16:58AM +090

Re: No type checking in ctype builtins

2022-04-27 Thread Andrea Monaco via Gcc
> Try -Wsystem-headers. You're right. That showed a warning. > You need to suppress the macro to get the builtin. That means a macro expansion takes precedence over a builtin function substitution, if I understand correctly. It makes sense, because preprocessing happens before compilati

Re: No type checking in ctype builtins

2022-04-27 Thread Jonathan Wakely via Gcc
On Wed, 27 Apr 2022 at 16:29, Andrea Monaco via Gcc wrote: > > > This program > > #include > > int main () > { > char *s; > isspace (s); > } > > compiles with no warning in gcc 8.3.0, even though there's a type > mistake; the correct call would be isspace (*s). N.B. The correct c

Re: No type checking in ctype builtins

2022-04-27 Thread Andreas Schwab
On Apr 27 2022, Andrea Monaco via Gcc wrote: > This program > > #include > > int main () > { > char *s; > isspace (s); > } > > compiles with no warning in gcc 8.3.0, even though there's a type > mistake; the correct call would be isspace (*s). Try -Wsystem-headers. > The ctype f

No type checking in ctype builtins

2022-04-27 Thread Andrea Monaco via Gcc
This program #include int main () { char *s; isspace (s); } compiles with no warning in gcc 8.3.0, even though there's a type mistake; the correct call would be isspace (*s). The ctype functions are implemented as macros in glibc, so you can't have type checking. But they ar

Re: [PATCH] linux/find: ignore -Wtype-limits to reduce W=2 warnings by 34% tree-wide

2022-04-27 Thread Yury Norov via Gcc
On Wed, Apr 27, 2022 at 11:58:58AM +0900, Vincent MAILHOL wrote: > + Alexander Lobakin > > On Wed. 27 Apr 2022 at 05:42, Yury Norov wrote: > > + gcc@gcc.gnu.org > > + Rikard Falkeborn > > > > On Wed, Apr 27, 2022 at 01:16:58AM +0900, Vincent Mailhol wrote: > > > find_first_bit(), find_first_and

Re: [PATCH] linux/find: ignore -Wtype-limits to reduce W=2 warnings by 34% tree-wide

2022-04-27 Thread Alexander Lobakin via Gcc
From: Vincent MAILHOL Date: Wed, 27 Apr 2022 11:58:58 +0900 > + Alexander Lobakin I was okay even with the previous solution to modify GENMASK_INPUT_CHECK() and this one is fine to me as well. The presense of warnings on W=1 doesn't mean we shouldn't fix W=12 etc. Especially when their rootfs a