From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20483 invoked by alias); 7 Apr 2007 09:16:42 -0000 Received: (qmail 20465 invoked by uid 22791); 7 Apr 2007 09:16:41 -0000 X-Spam-Check-By: sourceware.org Received: from heller.inter.net.il (HELO heller.inter.net.il) (213.8.233.23) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 07 Apr 2007 10:16:38 +0100 Received: from HOME-C4E4A596F7 (IGLD-80-230-99-4.inter.net.il [80.230.99.4]) by heller.inter.net.il (MOS 3.7.3a-GA) with ESMTP id CHC42028 (AUTH halo1); Sat, 7 Apr 2007 12:16:29 +0300 (IDT) Date: Sat, 07 Apr 2007 09:16:00 -0000 Message-Id: From: Eli Zaretskii To: Andreas Schwab CC: mark.kettenis@xs4all.nl, sje@cup.hp.com, gdb-patches@sourceware.org In-reply-to: (message from Andreas Schwab on Sat, 07 Apr 2007 08:18:19 +0200) Subject: Re: Patch for isdigit/isalpha/etc. macro arguments Reply-to: Eli Zaretskii References: <200704062336.QAA17806@hpsje.cup.hp.com> <200704062348.l36NmiwC025816@brahms.sibelius.xs4all.nl> X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2007-04/txt/msg00041.txt.bz2 > From: Andreas Schwab > Cc: sje@cup.hp.com, gdb-patches@sourceware.org > Date: Sat, 07 Apr 2007 08:18:19 +0200 > > > char *s = "..."; > > isalpha(*s); > > > > is perfectly reasonable code and should not result in compiler > > warnings. > > This will crash and burn if *s < 0. You really need to cast to unsigned > char if you want to get defined behaviour. Isn't that the job of the isalpha implementation?