I’m trying to use pgcc to compile version 1.6 of a code called “Triangle” (which can be downloaded from www.cs.cmu.edu/~quake/triangle.html). The compilation statement I am using is simply
pgcc -c -DLINUX triangle.c
The code fails under 6.0-8, 5.2-4, and 3.2-4 but compiles successfully under pgcc version 6.1-2, so I’m wondering whether this is a compiler problem that was fixed, or whether there is something non-standard here that I need to address.
The error message generated under version 6.0-8 is as follows:
PGC-S-0035-Syntax error: Recovery attempted by replacing ‘:’ by ‘?’ (triangle.c: 4910)
PGC-W-0089-Array name used in logical expression (triangle.c: 4910)
PGC-S-0056-Attempt to call non-function (triangle.c: 4910)
PGC/x86 Linux/x86 6.0-8: compilation completed with severe errors
Line 4910 of triangle.c looks like this:
_FPU_SETCW(cword);
where cword is of type int and was set on the previous line as
cword = 4722;
The function _FPU_SETCW is defined through this statement:
include <fpu_control.h>
Looking in /usr/include/fpu_control.h, _FPU_SETCW is defined as follows:
define _FPU_SETCW(cw) asm (“fldcw %0” : : “m” (*&cw))
Anyway, again, I’d be curious to know whether my problem has “disappeared” in pgcc 6.1-2 because of a compiler bug fix or whether there is something non-standard in the code that I can address.
Thanks,
David