Re: [GCC] multi-character constant warning

From: Chris Jacobson (fear@ATHENET.NET)
Date: 01/05/98


On 1/5/98 7:10 PM, George (greerga@CIRCLEMUD.ORG) stated:

>Don't turn off the warning because that is illegal C.
>
>try:
>if (!str_cmp(target, "Actn") {
>  ...
>} else if (!str_cmp(target, "Ammo")) {
>  ...
>} etc.

Well, it may be illegal C/C++, but it works :-)
The method you suggest, which I admit is the older tried and true method,
is slower and innefficient, and also makes for uglier code :-)

This may sound like blasphemy/heresy, but if it works, why knock it?  If
it ever breaks or fails I'll change it, but until then, might as well
keep it.

So I ask again, anyone know how to turn off the warning?

- Chris Jacobson


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