riscv-software-src / opensbi

RISC-V Open Source Supervisor Binary Interface

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Compiler Error: label at end of compound statement

deepaksirone opened this issue · comments

Hello,

I'm getting a compiler error when trying to build from the latest commit: 65c2190.

$ make PLATFORM=generic CROSS_COMPILE=riscv64-linux-gnu-                                                                              2 ↵
 CC        platform/generic/lib/utils/fdt/fdt_fixup.o
/data/projects/riscv/opensbi/lib/utils/fdt/fdt_fixup.c: In function ‘fdt_reserved_memory_fixup’:
/data/projects/riscv/opensbi/lib/utils/fdt/fdt_fixup.c:376:2: error: label at end of compound statement
  376 |  next_entry:
      |  ^~~~~~~~~~
make: *** [Makefile:569: /data/projects/riscv/opensbi/build/platform/generic/lib/utils/fdt/fdt_fixup.o] Error 1

riscv64-linux-gnu-gcc version: 9.2.1

Adding an empty statement after the next_entry label seems to fix it.

I am trying to fix it, this also happens with my GCC-10.