diff mbox series

[1/2] target/riscv: Include missing headers in 'vector_internals.h'

Message ID 20241203200828.47311-2-philmd@linaro.org
State New
Headers show
Series target/riscv: Include missing headers in '*internals.h' | expand

Commit Message

Philippe Mathieu-Daudé Dec. 3, 2024, 8:08 p.m. UTC
Rather than relying on implicit includes, explicit them,
in order to avoid when refactoring unrelated headers:

  target/riscv/vector_internals.h:36:12: error: call to undeclared function 'FIELD_EX32'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     36 |     return FIELD_EX32(simd_data(desc), VDATA, NF);
        |            ^

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 target/riscv/vector_internals.h | 1 +
 1 file changed, 1 insertion(+)

Comments

Daniel Henrique Barboza Dec. 3, 2024, 9:07 p.m. UTC | #1
On 12/3/24 5:08 PM, Philippe Mathieu-Daudé wrote:
> Rather than relying on implicit includes, explicit them,
> in order to avoid when refactoring unrelated headers:
> 
>    target/riscv/vector_internals.h:36:12: error: call to undeclared function 'FIELD_EX32'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
>       36 |     return FIELD_EX32(simd_data(desc), VDATA, NF);
>          |            ^
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---

Reviewed-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>

>   target/riscv/vector_internals.h | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/target/riscv/vector_internals.h b/target/riscv/vector_internals.h
> index 9e1e15b5750..a11cc8366dc 100644
> --- a/target/riscv/vector_internals.h
> +++ b/target/riscv/vector_internals.h
> @@ -20,6 +20,7 @@
>   #define TARGET_RISCV_VECTOR_INTERNALS_H
>   
>   #include "qemu/bitops.h"
> +#include "hw/registerfields.h"
>   #include "cpu.h"
>   #include "tcg/tcg-gvec-desc.h"
>   #include "internals.h"
Alistair Francis Dec. 4, 2024, 2:29 a.m. UTC | #2
On Wed, Dec 4, 2024 at 5:09 AM Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
>
> Rather than relying on implicit includes, explicit them,
> in order to avoid when refactoring unrelated headers:
>
>   target/riscv/vector_internals.h:36:12: error: call to undeclared function 'FIELD_EX32'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
>      36 |     return FIELD_EX32(simd_data(desc), VDATA, NF);
>         |            ^
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>

Reviewed-by: Alistair Francis <alistair.francis@wdc.com>

Alistair

> ---
>  target/riscv/vector_internals.h | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/target/riscv/vector_internals.h b/target/riscv/vector_internals.h
> index 9e1e15b5750..a11cc8366dc 100644
> --- a/target/riscv/vector_internals.h
> +++ b/target/riscv/vector_internals.h
> @@ -20,6 +20,7 @@
>  #define TARGET_RISCV_VECTOR_INTERNALS_H
>
>  #include "qemu/bitops.h"
> +#include "hw/registerfields.h"
>  #include "cpu.h"
>  #include "tcg/tcg-gvec-desc.h"
>  #include "internals.h"
> --
> 2.45.2
>
>
diff mbox series

Patch

diff --git a/target/riscv/vector_internals.h b/target/riscv/vector_internals.h
index 9e1e15b5750..a11cc8366dc 100644
--- a/target/riscv/vector_internals.h
+++ b/target/riscv/vector_internals.h
@@ -20,6 +20,7 @@ 
 #define TARGET_RISCV_VECTOR_INTERNALS_H
 
 #include "qemu/bitops.h"
+#include "hw/registerfields.h"
 #include "cpu.h"
 #include "tcg/tcg-gvec-desc.h"
 #include "internals.h"