Message-Id: Date: Tue, 28 Oct 1997 23:41:28 +0200 To: eliz AT is DOT elta DOT co DOT il, djgpp AT delorie DOT com References: Subject: Re: [Q]: unsigned char MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT From: Georg DOT Kolling AT t-online DOT de (Georg Kolling) Precedence: bulk Eli Zaretskii schrieb: > > On Mon, 27 Oct 1997, Georg Kolling wrote: > > > Using exactly this code, the compiler should give you the warning > > "multi-character character constant" because of "'\xFD'". > > '\xFD' represented as a number is 796411460, which can never be represented > > with an unsigned char. > > I think you are wrong. 'c' constants are not character constants, > they are ints. You can verify it with a simple test program I attach > at the end of this message. It prints 4 for the sizeof of all the > constants, which means they are ints. That is why GCC doesn't say > anything about multi-character constants. Well, GCC says something about multi-character constants, but I made a dumb typo when I tested this code. I wrote '/xFD' instead of '\xFD' and this will really make GCC complain about a multi-character constant. But I have never seen this format for hex numbers before, only 0xFD and 0FDh.