[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: compiling Nulib on Solaris 2.5
Adam Myrow (hurry@imap2.asu.edu) wrote:
: Philip Stephens (philip@io.bocaraton.ibm.com) wrote:
: : Adam,
: : It looks as if Nulib was written in the old-style K&R C, where as
: : your compiler is assuming ANSI C. The simplest way to avoid those
: : warnings and ensure that the program runs as expected is to pass
: : the option switch to the compiler that tells it to assume K&R C.
: : I can't tell you what that option switch is, but the man page for
: : your compiler will.
: Well, I tried that but no luck. I also tried gcc and it aborted.
: The lines where the "semantics" warnings appear are confusing. Here
: is a section of code that gives the compiler fits.
: if ( alloc_array(char, sfx, maxcode + 1, 256)
: #ifdef SPLIT_PFX
: || alloc_array(CODE, pfx[0], (maxcode + 1) / 2, 128)
: || alloc_array(CODE, pfx[1], (maxcode + 1) / 2, 128)
: #else
: || alloc_array(CODE, pfx, (maxcode + 1), 256)
: #endif
: ) {
: I've never run into anything like that. The specific lines that were
: complained about were the two beginning with "||." Maybe some one who
: knows their C can figure out why the compiler is griping.
Looks like the compiler is having fits over preprocessor commands. Check
the version of both 'cc' and 'gcc'. I know this sounds strange, but
a lot of university systems aren't exactly using the latest versions, and
may, in fact, be using buggy BETA versions as their installed software.
--
__ __|_) | |
| | | _` | \ ` \ _` | \
_| _|_|\__, |_| _|_|_|_|\__,_|_| _|
____/