Skip to content

When building benchmarks/dhrystone/, -Wimplicit-int and -Wimplicit-function-declaration cause many errors #598

@Heng-Zhou

Description

@Heng-Zhou

I encountered errors when running make command in "Building from repository" to build the riscv-tests repo:

....../riscv-tests/benchmarks/dhrystone/dhrystone.c:20:1: error: return type defaults to 'int' [-Wimplicit-int]
   20 | Proc_6 (Enum_Val_Par, Enum_Ref_Par)
      | ^~~~~~
....../riscv-tests/benchmarks/dhrystone/dhrystone.c: In function 'Proc_6':
....../riscv-tests/benchmarks/dhrystone/dhrystone.c:29:9: error: implicit declaration of function 'Func_3' [-Wimplicit-function-declaration]
   29 |   if (! Func_3 (Enum_Val_Par))
      |         ^~~~~~
....../riscv-tests/benchmarks/dhrystone/dhrystone.c: At top level:
....../riscv-tests/benchmarks/dhrystone/dhrystone.c:54:1: error: return type defaults to 'int' [-Wimplicit-int]
   54 | Proc_7 (Int_1_Par_Val, Int_2_Par_Val, Int_Par_Ref)
      | ^~~~~~

Similar errors can also be found at many other places of dhrystone.c and dhrystone_main.c. Can you please help me fix this issue? Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions