Mail Archives: djgpp/1997/10/28/17:42:58
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.
- Raw text -