larsbrinkhoff / pdp10-its-disassembler

Disassembler and other tools for files in ITS formats
GNU General Public License v2.0
19 stars 13 forks source link

Will not build under Ubuntu 21.04/riscv64 #119

Closed b4 closed 2 years ago

b4 commented 2 years ago

Using clang: Ubuntu clang version 12.0.0-3ubuntu1~21.04.2 Target: riscv64-unknown-linux-gnu

clang -g -W -Wall -c -o main.o main.c clang -g -W -Wall -c -o pdp10-opc.o pdp10-opc.c pdp10-opc.c:396:47: warning: missing field 'ac_hint' initializer [-Wmissing-field-initializers] { "fix", 0247, PDP10_BASIC, PDP10_KA10_SAIL }, ^ 1 warning generated. clang -g -W -Wall -c -o info.o info.c info.c:573:4: warning: format specifies type 'unsigned int' but the argument has type 'long long' [-Wformat] word & 0777777, (word >> 18) & 0777777); ^~~~~~ info.c:573:20: warning: format specifies type 'unsigned int' but the argument has type 'long long' [-Wformat] word & 0777777, (word >> 18) & 0777777); ^~~~~~ 2 warnings generated. clang -g -W -Wall -c -o dis.o dis.c clang -g -W -Wall -c -o symbols.o symbols.c clang -g -W -Wall -c -o timing.o timing.c clang -g -W -Wall -c -o timing_ka10.o timing_ka10.c clang -g -W -Wall -c -o timing_ki10.o timing_ki10.c clang -g -W -Wall -c -o memory.o memory.c clang -g -W -Wall -c -o weenix.o weenix.c clang -g -W -Wall -c -o fasl-file.o fasl-file.c fasl-file.c:52:7: error: expected expression char p = string; ^ fasl-file.c:57:12: error: use of undeclared identifier 'p' p++ = (data >> 29) & 0177; ^ fasl-file.c:58:12: error: use of undeclared identifier 'p' p++ = (data >> 22) & 0177; ^ fasl-file.c:59:12: error: use of undeclared identifier 'p' p++ = (data >> 15) & 0177; ^ fasl-file.c:60:12: error: use of undeclared identifier 'p' p++ = (data >> 8) & 0177; ^ fasl-file.c:61:12: error: use of undeclared identifier 'p' p++ = (data >> 1) & 0177; ^ 6 errors generated. make: *** [: fasl-file.o] Error 1

Using GCC 10: gcc -g -W -Wall -c -o main.o main.c gcc -g -W -Wall -c -o pdp10-opc.o pdp10-opc.c pdp10-opc.c:396:3: warning: missing initializer for field ‘ac_hint’ of ‘const struct pdp10_instruction’ [-Wmissing-field-initializers] 396 { "fix", 0247, PDP10_BASIC, PDP10_KA10_SAIL }, ^ In file included from pdp10-opc.c:19: opcode/pdp10.h:126:7: note: ‘ac_hint’ declared here 126 int ac_hint; ^~~ gcc -g -W -Wall -c -o info.o info.c info.c: In function ‘dec_info’: info.c:572:35: warning: format ‘%o’ expects argument of type ‘unsigned int’, but argument 3 has type ‘word_t’ {aka ‘long long int’} [-Wformat=] 572 fprintf (output_file, "DDT from %o to %o\n", ~^
unsigned int
%llo
573 word & 0777777, (word >> 18) & 0777777);
~~~~~~
word_t {aka long long int}
info.c:572:41: warning: format ‘%o’ expects argument of type ‘unsigned int’, but argument 4 has type ‘word_t’ {aka ‘long long int’} [-Wformat=] 572 fprintf (output_file, "DDT from %o to %o\n", ~^
unsigned int
%llo
573 word & 0777777, (word >> 18) & 0777777);
~~~~~~
word_t {aka long long int}

gcc -g -W -Wall -c -o dis.o dis.c gcc -g -W -Wall -c -o symbols.o symbols.c gcc -g -W -Wall -c -o timing.o timing.c gcc -g -W -Wall -c -o timing_ka10.o timing_ka10.c gcc -g -W -Wall -c -o timing_ki10.o timing_ki10.c gcc -g -W -Wall -c -o memory.o memory.c gcc -g -W -Wall -c -o weenix.o weenix.c gcc -g -W -Wall -c -o fasl-file.o fasl-file.c fasl-file.c: In function ‘read_atomtable’: fasl-file.c:52:7: error: a label can only be part of a statement and a declaration is not a statement 52 | char *p = string; | ^~~~ make: *** [: fasl-file.o] Error 1

larsbrinkhoff commented 2 years ago

I hope #120 fixes these.

b4 commented 2 years ago

Built and passed all tests successfully.

larsbrinkhoff commented 2 years ago

Thanks!