[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [POLL] C99, declaration after statement

From: Gary V. Vaughan
Subject: Re: [POLL] C99, declaration after statement
Date: Sun, 25 Sep 2011 12:31:50 +0700

On 25 Sep 2011, at 11:32, Paul Eggert wrote:
> On 09/24/11 07:26, Bruno Haible wrote:
>> 1) Is it important for you that what you get from gnulib can be compiled
>>   with a C89 compiler (gcc 2.95, IRIX cc, MSVC)?
> IRIX users can install either GCC or MIPSpro C (the SGI proprietary compiler).
> Any serious IRIX installation should have one or the other.

$ systype

$ cc -v
MIPSpro Compilers: Version 7.4.4m

$ cat hello.c
#include <stdio.h>

int main (int argc, const char *argv[]) {
        printf ("Hello, World!\n");
        int x = 0;
        return x;

$ cc -o hello hello.c
cc-1241 cc: ERROR File = hello.c, Line = 7
  A declaration cannot appear after an executable statement in a block.

          int x = 0;

1 error detected in the compilation of "hello.c".

Occasionally, we will resort to compiling with gcc, but the mips compiler
generally produces tighter code than gcc, so where at all possible I have to
painstakingly patch C99-isms to get the mips compiler to accept unportable
code like the above.

This is the latest OS release, with the latest compiler and C library.

> SGI will stop support for IRIX in December 2013
> <http://www.sgi.com/products/software/irix/>
> so IRIX will become moot soon anyway.

Except that some of us still have to support clients that use modern free
software on IRIX.  The system doesn't cease to exist just because SGI are no
longer providing support.  And in any case that's still more than 2 years

Gary V. Vaughan (gary AT gnu DOT org)

reply via email to

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