From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7490 invoked by alias); 31 Mar 2008 17:28:32 -0000 Received: (qmail 7477 invoked by uid 22791); 31 Mar 2008 17:28:32 -0000 X-Spam-Check-By: sourceware.org Received: from shell4.BAYAREA.NET (HELO shell4.bayarea.net) (209.128.82.1) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 31 Mar 2008 17:28:12 +0000 Received: (qmail 10567 invoked from network); 31 Mar 2008 10:23:25 -0700 Received: from 209-128-106-254.bayarea.net (HELO redwood.eagercon.com) (209.128.106.254) by shell4.bayarea.net with SMTP; 31 Mar 2008 10:23:23 -0700 Message-ID: <47F11E0A.4010909@eagercon.com> Date: Mon, 31 Mar 2008 17:28:00 -0000 From: Michael Eager User-Agent: Thunderbird 2.0.0.12 (X11/20080226) MIME-Version: 1.0 To: Ed Stafford CC: John Love-Jensen , GCC-help Subject: Re: Signedness of char and puts() References: <47F0FB82.9040007@eagercon.com> <20080331150543.AF81510A00B2@mail182-dub.bigfish.com> In-Reply-To: <20080331150543.AF81510A00B2@mail182-dub.bigfish.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2008-03/txt/msg00336.txt.bz2 Ed Stafford wrote: > Thanks for the replies. > > It does seem that gcc is treating them as 3 separate > types. > > The compiler will treat plain char as signed or unsigned > depending on the ABI, but even if the default is for char > to act like unsigned char, it will warn you that char and > unsigned char are of different types. > >>From the docs: > > Which of signed char or unsigned char has the same range, > representation, and behavior as "plain" char. Determined by ABI. > The options '-funsigned-char' and '-fsigned-char' change the > default. > > It just seems that older versions of gcc didn't do this. > > Does it seem I'm on the right track here? Yes. It appears that you will only get these messages if you specify -Wall. I don't see any messages on a compile without the flag. -- Michael Eager eager@eagercon.com 1960 Park Blvd., Palo Alto, CA 94306 650-325-8077