Complete.Org: Mailing Lists: Archives: freeciv-dev: October 2000:
[Freeciv-Dev] Re: OSF1 V4.0D 878 alpha port
Home

[Freeciv-Dev] Re: OSF1 V4.0D 878 alpha port

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: "Argiolas dr. Nicola" <argiolas@xxxxxxxxxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: OSF1 V4.0D 878 alpha port
From: Gaute Strokkenes <gs234@xxxxxxxxxxxxx>
Date: 13 Oct 2000 15:31:22 +0100

Argiolas Nicola <nick@xxxxxxxxxxxxxx> writes:

> Hi!
> 
>       I've followed this great project for a long time, now it's time to
> do my little part.
> 
>       I've tried to compile the code in an Alpha Workstation, with a
> regular Digital C and some add-ons (like Xaw3d and GNU gettext) installed
> by me. Here is a patch (from the latest cvs) with some really minor
> modifications, that avoid useless Warnings.
> 
>       Although this patch is quiet... stupid, we can learn from this 
> some 'style' guidelines:
> 
>       1. every #include or #define (and so on..) line MUST begin at the
> first coloumn of the file, because otherwise the preprocessor could ignore
> it;

An ANSI compiler is required...

>       2. the char variables are unsigned by default in GCC,

You're wrong.  A char are signed by default in GCC, for consistency
with other integer types.

> but other compilers consider them signed like the other int
> variables; so in GCC it's useless to specify unsigned char, and it's
> not good for the others:

Declare them as char when you don't care, and explicity as signed or
unsigned when it makes a difference.  I think this is (supposed to
be?)  current practice.  It's necessary to be careful here, for
instance CHAR_MAX is used as a magic value in certain places in the
ANSI standard.

It sounds to me like the Digital compiler is just a bit more strident
about warnings than GCC in this respect, and that this has lead you to
make the wrong conclusion concerning GCC.  It would be helpful if you
were to include the exact output from the compiler so that we can
chase them down.  (Or even better, produce a patch...)

-- 
GS



[Prev in Thread] Current Thread [Next in Thread]