This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: warning: multi-character character constant


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
>
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]