From owner-freebsd-hackers Sun Jun 1 00:04:21 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id AAA10373 for hackers-outgoing; Sun, 1 Jun 1997 00:04:21 -0700 (PDT) Received: from techunix.technion.ac.il (mellon@techunix.technion.ac.il [132.68.1.28]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id AAA10364 for ; Sun, 1 Jun 1997 00:04:15 -0700 (PDT) Received: (from mellon@localhost) by techunix.technion.ac.il (8.8.5/8.8.5) id KAA13488; Sun, 1 Jun 1997 10:03:24 +0300 (IDT) Message-ID: <19970601100320.37936@techunix.technion.ac.il> Date: Sun, 1 Jun 1997 10:03:20 +0300 From: Anatoly Vorobey To: Steve Howe Cc: hackers@freebsd.org Subject: Re: signed/unsigned cpp References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.64 X-Disclaimer: I was young, I needed the money! Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk You, Steve Howe, wrote on Sat, May 31, 1997 at 09:43:53PM -0800: > > how can this be? i changed my argument to > "signed char *" and gcc doesn't like it. so i change it to > "unsigned char *" and gcc doesn't like it either! gcc wants to > have it's cake and eat it too! it doesn't mind "char *" though. > > so what's wrong with adding "signed" or "unsigned"? >From gcc's Info: Each kind of machine has a default for what `char' should be. It is either like `unsigned char' by default or like `signed char' by default. And later: The type `char' is always a distinct type from each of `signed char' or `unsigned char', even though its behavior is always just like one of those two. gcc is probably acting up because you specified a fascistic warning level ;) In fact I just tried to reproduce it and -Wall -pedantic did the trick, while -Wall by itself or even with -ansi wasn't enough. -- Anatoly Vorobey, mellon@pobox.com http://pobox.com/~mellon/ "Angels can fly because they take themselves lightly" - G.K.Chesterton