From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11183 invoked by alias); 22 Sep 2004 16:43:32 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 11176 invoked from network); 22 Sep 2004 16:43:30 -0000 Received: from unknown (HELO wren.rentec.com) (65.213.84.9) by sourceware.org with SMTP; 22 Sep 2004 16:43:30 -0000 Received: from darter.rentec.com (darter.rentec.com [172.26.132.158]) by wren.rentec.com (8.12.9/8.12.1) with ESMTP id i8MGhSSQ021069; Wed, 22 Sep 2004 12:43:28 -0400 (EDT) Received: by darter.rentec.com (Postfix, from userid 414) id 51BD61422D53; Wed, 22 Sep 2004 12:43:28 -0400 (EDT) To: pkoning@equallogic.com From: terra@gnome.org (Morten Welinder) Cc: gcc@gcc.gnu.org, dk@artimi.com In-reply-to: <16721.43357.693576.988329@gargle.gargle.HOWL> (message from Paul Koning on Wed, 22 Sep 2004 12:33:33 -0400) Subject: Re: signed vs unsigned pointer warning References: <20040922161751.B4F6A1422D53@darter.rentec.com> <16721.43357.693576.988329@gargle.gargle.HOWL> Message-Id: <20040922164328.51BD61422D53@darter.rentec.com> Date: Wed, 22 Sep 2004 17:27:00 -0000 X-SW-Source: 2004-09/txt/msg01292.txt.bz2 > EOF isn't a character. No-one said it was. It evaluates to an int. > I don't understand your point. isprint takes a char * argument. NO! It takes an int argument. And only certain ints are valid: EOF (== -1 everywhere, it seems) and the range of unsigned char, i.e., 0-255. If you wanted to make signed args valid arguments -- and doing so would be an extension to the standards -- then isprint would need to be able to distinguish EOF and (int)(signed char)-1. How do you propose to do that? > You can do it by casts, by configure, or by using a 384 entry > array, to mention just a few. As it follows from the above, neither of these methods actually work. Morten