Re: [GCC] multi-character constant warning

From: George (greerga@CIRCLEMUD.ORG)
Date: 01/05/98


On Mon, 5 Jan 1998, Chris Jacobson wrote:

>I searched through GCC's manpage and EGCS's manpage (I use EGCS btw), but
>couldn't find anything about turning off this warning:
>
>objects.c++:429: warning: multi-character character constant
>
> case 'Actn':
> case 'Affs':
> case 'Ammo':
> case 'Cost':

Don't turn off the warning because that is illegal C.

try:
if (!str_cmp(target, "Actn") {
  ...
} else if (!str_cmp(target, "Ammo")) {
  ...
} etc.

--
George Greer  -  Me@Null.net   | Genius may have its limitations, but stupidity
http://www.van.ml.org/~greerga | is not thus handicapped. -- Elbert Hubbard


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/15/00 PST