public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* No type checking in ctype builtins
@ 2022-04-27 15:29 Andrea Monaco
  2022-04-27 15:54 ` Andreas Schwab
  2022-04-27 16:19 ` Jonathan Wakely
  0 siblings, 2 replies; 6+ messages in thread
From: Andrea Monaco @ 2022-04-27 15:29 UTC (permalink / raw)
  To: gcc


This program

  #include <ctype.h>

  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 are also provided as builtins by gcc, so I
wonder why type checking is not performed in that case, either.



Thanks,

Andrea Monaco

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-04-28 12:02 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-27 15:29 No type checking in ctype builtins Andrea Monaco
2022-04-27 15:54 ` Andreas Schwab
2022-04-27 18:07   ` Andrea Monaco
2022-04-28 11:13   ` Florian Weimer
2022-04-27 16:19 ` Jonathan Wakely
2022-04-28 12:02   ` Eric Gallager

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).