From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from confino.investici.org (confino.investici.org [IPv6:2a11:7980:1::2:0]) by sourceware.org (Postfix) with ESMTPS id 5E082385842B for ; Wed, 27 Apr 2022 15:29:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 5E082385842B Received: from mx1.investici.org (unknown [127.0.0.1]) by confino.investici.org (Postfix) with ESMTP id 4KpN2S3hCLz10vK for ; Wed, 27 Apr 2022 15:29:04 +0000 (UTC) Received: from [93.190.126.19] (mx1.investici.org [93.190.126.19]) (Authenticated sender: andrea.monaco@autistici.org) by localhost (Postfix) with ESMTPSA id 4KpN2S2zWqz10tx for ; Wed, 27 Apr 2022 15:29:04 +0000 (UTC) From: Andrea Monaco To: gcc@gcc.gnu.org Subject: No type checking in ctype builtins Date: Wed, 27 Apr 2022 17:29:03 +0200 Message-ID: <87sfpy1r5s.fsf@autistici.org> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-3.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Apr 2022 15:29:09 -0000 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 are also provided as builtins by gcc, so I wonder why type checking is not performed in that case, either. Thanks, Andrea Monaco