This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: warning: multi-character character constant
- To: <valfer at flashnet dot it>, <gcc-bugs at gcc dot gnu dot org>, <bug-gcc at gnu dot org>
- Subject: Re: warning: multi-character character constant
- From: "Tim Prince" <tprince at computer dot org>
- Date: Fri, 27 Oct 2000 06:35:55 -0700
- References: <39F85CA5.55A64B39@flashnet.it>
That's a somewhat obscure feature which has been in C since long before
ANSI/ISO; 'xxxx' is not a null-terminated character string like "xxxx" which
would be stored byte-wise. It depends on your system being capable of
storing that group of characters in a way similar to that suggested by your
quoted usage, so it's non-portable. Of course, nowadays, 4 characters are
expected to fit in a long, but there's also the possibility that a string
was meant rather than a multi-character constant.
----- Original Message -----
From: "Valerio Ferrucci" <valfer@flashnet.it>
To: <gcc-bugs@gcc.gnu.org>; <bug-gcc@gnu.org>
Sent: Thursday, October 26, 2000 9:32 AM
Subject: warning: multi-character character constant
> Hi,
> I get always this warning during code compiling:
>
> warning: multi-character character constant
>
> in lines like:
> if (*(long*)p == 'xxxx'))
> ...
>
> What does it mean?
> Thanks for help
>
> ==================================================================
> Valerio Ferrucci Tabasoft Sas
> valfer@flashnet.it http://tabasoft.ancitel.it
> taba@flashnet.it
>
>