Hi! while compiling luatex, i got an error: xlc -DHAVE_CONFIG_H -I. -I../../../texk/web2c -I.. -I../../../texk/web2c/.. -I/opt/freeware/include -I../../libs/obsdcompat -I../../libs/obsdcompat/.. -I../../../texk/web2c/../../libs/obsdcompat -I../../../texk/web2c/../../libs/obsdcompat/.. -I../../../texk/web2c/../../libs/zlib -I../../../texk/web2c/../../libs/libpng -I../../../texk/web2c/../../libs/xpdf -Dextra_version_info=`date +-%Y%m%d%H` -O2 -qmaxmem=262144 -qarch=com -qlanglvl=extended -qcpluscmt -c luatex0.c -o luatex0.o "luatex0.c", line 8931.5: 1506-117 (S) Operand must be a scalar type. "luatex0.c", line 8940.3: 1506-117 (S) Operand must be a scalar type. "luatex0.c", line 9005.5: 1506-117 (S) Operand must be a scalar type. "luatex0.c", line 9124.11: 1506-117 (S) Operand must be a scalar type. "luatex0.c", line 9133.11: 1506-117 (S) Operand must be a scalar type. here are the statements on the referenced lines: 8931: eq_destroy ( eqtb [p ]) ; 8940: eq_destroy ( eqtb [p ]) ; 9005: eq_destroy ( eqtb [p ]) ; 9124: eq_destroy ( save_stack [save_ptr ]) ; 9133: eq_destroy ( eqtb [p ]) ; does this make sense to you? eqtb and save_stack is a structure. Best, v.
Hi Vladimir, Vladimir Volovich wrote:
Hi!
while compiling luatex, i got an error:
xlc -DHAVE_CONFIG_H -I. -I../../../texk/web2c -I.. -I../../../..... "luatex0.c", line 8931.5: 1506-117 (S) Operand must be a scalar type. "luatex0.c", line 8940.3: 1506-117 (S) Operand must be a scalar type. "luatex0.c", line 9005.5: 1506-117 (S) Operand must be a scalar type. "luatex0.c", line 9124.11: 1506-117 (S) Operand must be a scalar type. "luatex0.c", line 9133.11: 1506-117 (S) Operand must be a scalar type.
here are the statements on the referenced lines:
8931: eq_destroy ( eqtb [p ]) ; 8940: eq_destroy ( eqtb [p ]) ; 9005: eq_destroy ( eqtb [p ]) ; 9124: eq_destroy ( save_stack [save_ptr ]) ; 9133: eq_destroy ( eqtb [p ]) ;
does this make sense to you? eqtb and save_stack is a structure.
It may be complaining about eq_destroy, because these five happen to be all the calls to that function. Perhaps it misinterprets the macro in luatexcoerce.h. Not that I see a reason why it should, this function is converted by web2c just like all others. Or perhaps it is mis-optimizing something? Sorry, I am much more lost than you are, and I have knowledge of nor access to the IBM compiler suite. Best wishes, Taco
Taco Hoekwater
Vladimir Volovich wrote:
while compiling luatex, i got an error:
xlc -DHAVE_CONFIG_H -I. -I../../../texk/web2c -I.. -I../../../..... "luatex0.c", line 8931.5: 1506-117 (S) Operand must be a scalar type. "luatex0.c", line 8940.3: 1506-117 (S) Operand must be a scalar type. "luatex0.c", line 9005.5: 1506-117 (S) Operand must be a scalar type. "luatex0.c", line 9124.11: 1506-117 (S) Operand must be a scalar type. "luatex0.c", line 9133.11: 1506-117 (S) Operand must be a scalar type.
here are the statements on the referenced lines:
8931: eq_destroy ( eqtb [p ]) ; 8940: eq_destroy ( eqtb [p ]) ; 9005: eq_destroy ( eqtb [p ]) ; 9124: eq_destroy ( save_stack [save_ptr ]) ; 9133: eq_destroy ( eqtb [p ]) ;
does this make sense to you? eqtb and save_stack is a structure.
It may be complaining about eq_destroy, because these five happen to be all the calls to that function. Perhaps it misinterprets the macro in luatexcoerce.h. Not that I see a reason why it should, this function is converted by web2c just like all others. Or perhaps it is mis-optimizing something?
Ancient compilers did not allow for passing structures to functions. It sounds somewhat unlikely that this would be the only case here, though. Maybe a missing prototype or something for eq_destroy? -- David Kastrup, Kriemhildstr. 15, 44793 Bochum
here are the statements on the referenced lines:
8931: eq_destroy ( eqtb [p ]) ; 8940: eq_destroy ( eqtb [p ]) ; 9005: eq_destroy ( eqtb [p ]) ; 9124: eq_destroy ( save_stack [save_ptr ]) ; 9133: eq_destroy ( eqtb [p ]) ;
does this make sense to you? eqtb and save_stack is a structure.
It may be complaining about eq_destroy, because these five happen to be all the calls to that function. Perhaps it misinterprets the macro in luatexcoerce.h. Not that I see a reason why it should, this function is converted by web2c just like all others. Or perhaps it is mis-optimizing something?
DK> Ancient compilers did not allow for passing structures to DK> functions. It sounds somewhat unlikely that this would be the only DK> case here, though. DK> Maybe a missing prototype or something for eq_destroy? i investigated it further. after pre-processing, eq_destroy ( eqtb [p ]) ; gets changed to: zeq_destroy((memoryword) (eqtb [p ])) ; i.e. the casts are added to the argument. it appears that the compiler is not happy about the constructs with such casts, it has nothing to do with the zeq_destroy function itself. i.e. if i manually remove the casts after passing the code through a pre-processor, i.e. change it to zeq_destroy( eqtb [p ]) ; then it compiles fine. to see further, i created a small test file: =================================== typedef struct { int CINT0, CINT1; } twoints; void test (twoints *z) { twoints v1 = z[0]; twoints v2 = (twoints) (z[0]); twoints v3 = *z; twoints v4 = (twoints) (*z); } =================================== $ xlc -c test.c "test.c", line 7.17: 1506-117 (S) Operand must be a scalar type. "test.c", line 9.17: 1506-117 (S) Operand must be a scalar type. it gives errors for lines with casts and no errors for lines without casts. does that make sense to anyone? Best, v.
"VV" == Vladimir Volovich writes: VV> does that make sense to anyone? i tested this with GCC, and got these warnings with the -pedantic option: $ gcc -c -pedantic test.c test.c: In function 'test': test.c:7: warning: ISO C forbids casting nonscalar to the same type test.c:9: warning: ISO C forbids casting nonscalar to the same type so i guess xlc's refusal to compile is not completely groundless. Best, v.
Vladimir Volovich wrote:
"VV" == Vladimir Volovich writes:
VV> does that make sense to anyone?
i tested this with GCC, and got these warnings with the -pedantic option:
$ gcc -c -pedantic test.c test.c: In function 'test': test.c:7: warning: ISO C forbids casting nonscalar to the same type test.c:9: warning: ISO C forbids casting nonscalar to the same type
so i guess xlc's refusal to compile is not completely groundless.
Ok, found it. Patch is forthcoming. Best wishes, Taco
participants (3)
-
David Kastrup
-
Taco Hoekwater
-
Vladimir Volovich