[GRASS5] ISO C90 does not support `long long'

Hi,

using the "-pedantic" gcc flag, I get this message:

include/grass/dgl/type.h:66: warning: ISO C90 does not support `long long'

How to fix that line?

Markus

On Wed, Feb 01, 2006 at 10:13:06AM +0100, Markus Neteler wrote:

Hi,

using the "-pedantic" gcc flag, I get this message:

include/grass/dgl/type.h:66: warning: ISO C90 does not support `long long'

How to fix that line?

That's C99. So using -std=c99 should 'fix' the issue :slight_smile:

--
Francesco P. Lovergine

On Wed, Feb 01, 2006 at 12:33:54PM +0100, Francesco P. Lovergine wrote:

On Wed, Feb 01, 2006 at 10:13:06AM +0100, Markus Neteler wrote:
> Hi,
>
> using the "-pedantic" gcc flag, I get this message:
>
> include/grass/dgl/type.h:66: warning: ISO C90 does not support `long long'
>
> How to fix that line?
>

That's C99. So using -std=c99 should 'fix' the issue :slight_smile:

Since it is the only 'long long', I would prefer a different
implementation.

Markus

Markus Neteler wrote:

using the "-pedantic" gcc flag, I get this message:

include/grass/dgl/type.h:66: warning: ISO C90 does not support `long long'

How to fix that line?

Option 1: check whether the implementation supports "long long", and
define dglInt64_t as something else (e.g. "long") if it doesn't.

You can use the configure macro:

  AC_CHECK_TYPES(long long)

which should define HAVE_LONG_LONG if the type exists.

The disadvantage is that the file format will be incompatible with
systems which do have a 64-bit integral type.

Option 2: change the nnCost field to double, and modify the code which
reads and writes the nnCost field to read/write 2 32-bit values and
convert them to/from a double value.

--
Glynn Clements <glynn@gclements.plus.com>