[GRASS5] r.sun bug

Glynn Clements glynn.clements at virgin.net
Fri Feb 21 09:28:05 EST 2003


Paul Kelly wrote:

> The latest version of r.sun contains the inline keyword in front of 3
> function definitions in main.c . But as far as I can make out this is a
> C++ keyword and doesn't work in C. It won't compile on IRIX anyway.

It works in gcc. Everyone uses gcc, right? ;)

Seriously, I'm glad that someone is testing this stuff on something
other than Linux/x86. In many respects, Linux/x86 is the worst
possible test platform, as so many things which work there won't work
anywhere else. E.g.

1. Alignment restrictions: unaligned memory access (e.g. reading a
32-bit word from an odd address) works on x86 but fails (either raises
a signal or returns bogus data) on most other architectures.

2. gcc extensions: gcc has many extensions (e.g. "inline", C++ "//"
comments, recently C9X), and many of them are enabled by default.

3. GNU libc: while some platforms have non-core functionality
(sockets, name-service, I18N) in separate libraries, GNU libc puts it
into libc itself. Consequently, the tests get omitted from configure
and the definitions get omitted from the Gmakefiles.

-- 
Glynn Clements <glynn.clements at virgin.net>




More information about the grass-dev mailing list