MOO-cows Mailing List Archive

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

Re: compiling problems



>If your compiler doesn't recognize the `#error' preprocessor directive, then it
>isn't ANSI compliant.  Maybe you have to give it some options to enable ANSI
>compliance?

Thanks for the help. I tried the SparCompiler option -Xa, and it got a lot
further, with only a few warnings. Unfortunately, the compiler stopped when
it got to numbers.c, and I don't know what to make of the errors it gave
me.

Can anyone make sense of these error messages?

Rob

---------

>From the SparcCompiler 3.0 manual:

-Xa

(a = ANSI) ANSI C plus K&R C compatibility extensions, with semantic
changes required by ANSI C. Where K&R C and ANSI C specify different
semantics for the same construct, the compiler will issue warnings about
the conflict and use the ANSI C interpretation.


Compiler log:

cc -O -Xa  -c  numbers.c
ucbcc: Warning: "-Xa" redefines compatibility mode from "SunC transition"
to "ANSI"
"/usr/include/stdlib.h", line 65: identifier redeclared: atof
        current : function(pointer to char) returning double
        previous: function(pointer to const char) returning double :
"/usr/include/floatingpoint.h", line 173
"/usr/include/stdlib.h", line 68: identifier redeclared: strtod
        current : function(pointer to char, pointer to pointer to char)
returning double
        previous: function(pointer to const char, pointer to pointer to
char) returning double : "/usr/include/floatingpoint.h", line 174
"/usr/include/stdlib.h", line 84: identifier redeclared: system
        current : function(pointer to char) returning int
        previous: function(pointer to const char) returning int :
"/usr/ucbinclude/stdio.h", line 233
"./my-stdio.h", line 40: identifier redeclared: perror
        current : function(pointer to char) returning void
        previous: function(pointer to const char) returning void :
"/usr/ucbinclude/stdio.h", line 207
"./my-stdio.h", line 44: identifier redeclared: remove
        current : function(pointer to char) returning int
        previous: function(pointer to const char) returning int :
"/usr/ucbinclude/stdio.h", line 161
"./my-stdio.h", line 45: identifier redeclared: rename
        current : function(pointer to char, pointer to char) returning int
        previous: function(pointer to const char, pointer to const char)
returning int : "/usr/ucbinclude/stdio.h", line 162
*** Error code 2
make: Fatal error: Command failed for target `numbers.o'





Home | Subject Index | Thread Index