On Wed, Apr 27, 2022 at 12:20 PM Jonathan Wakely via Gcc
wrote:
>
> 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, ev
* 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.
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
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
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
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