public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 0/7] sim, sim/ARCH: Add ATTRIBUTE_PRINTF
@ 2022-09-25  8:44 Tsukasa OI
  2022-09-25  8:44 ` [PATCH 1/7] sim: " Tsukasa OI
                   ` (7 more replies)
  0 siblings, 8 replies; 32+ messages in thread
From: Tsukasa OI @ 2022-09-25  8:44 UTC (permalink / raw)
  To: Tsukasa OI, Andrew Burgess, Mike Frysinger, Stephane Carrez,
	Frank Ch . Eigler
  Cc: gdb-patches

Hello,

[Background]

When we build Binutils and GDB with Clang, it causes a build failure due to
warnings generated by Clang and the default -Werror configuration.

I finally managed to make ALL ARCHITECTURE ENABLED Binutils and GDB
-Werror-free on Clang 15.0.0 (note that this does not necessarily mean
warning-free) and this patchset is a part of it
(the printf-like functions in the simulator).

Full Clang 15.0.0 -Werror-free branch is available at:
<https://github.com/a4lg/binutils-gdb/tree/clang-nowarn-dev>


[About this Patchset]

Clang generates a warning if the format string of a printf-like function is
not a literal ("-Wformat-nonliteral").  On the default configuration, it
causes a build failure (unless "--disable-werror" is specified).

To avoid warnings on the printf-like wrapper, it requires proper
__attribute__((format)) and we have ATTRIBUTE_PRINTF macro for this reason.

This patchset adds ATTRIBUTE_PRINTF to all functions that require
ATTRIBUTE_PRINTF macro.

Note that most of the changes are made to architecture without any arch
maintainer so I feel sorry for Andrew and Mike.


Thanks,
Tsukasa




Tsukasa OI (7):
  sim: Add ATTRIBUTE_PRINTF
  sim/cris: Add ATTRIBUTE_PRINTF
  sim/erc32: Add ATTRIBUTE_PRINTF
  sim/m32c: Add ATTRIBUTE_PRINTF
  sim/m68hc11: Add ATTRIBUTE_PRINTF
  sim/ppc: Add ATTRIBUTE_PRINTF
  sim/rl78: Add ATTRIBUTE_PRINTF

 sim/common/sim-cpu.h      | 3 ++-
 sim/cris/traps.c          | 2 +-
 sim/erc32/interf.c        | 2 +-
 sim/erc32/sis.c           | 2 +-
 sim/m32c/trace.c          | 4 ++--
 sim/m68hc11/m68hc11_sim.c | 2 +-
 sim/m68hc11/sim-main.h    | 5 +++--
 sim/ppc/main.c            | 2 +-
 sim/ppc/misc.c            | 4 ++--
 sim/ppc/sim_calls.c       | 2 +-
 sim/rl78/trace.c          | 4 ++--
 11 files changed, 17 insertions(+), 15 deletions(-)


base-commit: 58d69206b8173b9d027a6c65f56cdaf045ae6e64
-- 
2.34.1


^ permalink raw reply	[flat|nested] 32+ messages in thread

* [PATCH 1/7] sim: Add ATTRIBUTE_PRINTF
  2022-09-25  8:44 [PATCH 0/7] sim, sim/ARCH: Add ATTRIBUTE_PRINTF Tsukasa OI
@ 2022-09-25  8:44 ` Tsukasa OI
  2022-09-25  8:44 ` [PATCH 2/7] sim/cris: " Tsukasa OI
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 32+ messages in thread
From: Tsukasa OI @ 2022-09-25  8:44 UTC (permalink / raw)
  To: Tsukasa OI, Andrew Burgess, Mike Frysinger, Stephane Carrez,
	Frank Ch . Eigler
  Cc: gdb-patches

Clang generates a warning if the format string of a printf-like function is
not a literal ("-Wformat-nonliteral").  On the default configuration, it
causes a build failure (unless "--disable-werror" is specified).

To avoid warnings on the printf-like wrapper, it requires proper
__attribute__((format)) and we have ATTRIBUTE_PRINTF macro for this reason.

This commit adds ATTRIBUTE_PRINTF to a printf-like function.

sim/ChangeLog:

	* common/sim-cpu.h (sim_io_eprintf_cpu): Add ATTRIBUTE_PRINTF.
---
 sim/common/sim-cpu.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sim/common/sim-cpu.h b/sim/common/sim-cpu.h
index d8b2b9c494a..024eb31d79a 100644
--- a/sim/common/sim-cpu.h
+++ b/sim/common/sim-cpu.h
@@ -137,7 +137,8 @@ extern sim_cpu *sim_cpu_lookup (SIM_DESC, const char *);
 /* Return prefix to use in cpu specific messages.  */
 extern const char *sim_cpu_msg_prefix (sim_cpu *);
 /* Cover fn to sim_io_eprintf.  */
-extern void sim_io_eprintf_cpu (sim_cpu *, const char *, ...);
+extern void sim_io_eprintf_cpu (sim_cpu *, const char *, ...)
+    ATTRIBUTE_PRINTF (2, 3);
 
 /* Get/set a pc value.  */
 #define CPU_PC_GET(cpu) ((* CPU_PC_FETCH (cpu)) (cpu))
-- 
2.34.1


^ permalink raw reply	[flat|nested] 32+ messages in thread

* [PATCH 2/7] sim/cris: Add ATTRIBUTE_PRINTF
  2022-09-25  8:44 [PATCH 0/7] sim, sim/ARCH: Add ATTRIBUTE_PRINTF Tsukasa OI
  2022-09-25  8:44 ` [PATCH 1/7] sim: " Tsukasa OI
@ 2022-09-25  8:44 ` Tsukasa OI
  2022-09-25  8:44 ` [PATCH 3/7] sim/erc32: " Tsukasa OI
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 32+ messages in thread
From: Tsukasa OI @ 2022-09-25  8:44 UTC (permalink / raw)
  To: Tsukasa OI, Andrew Burgess, Mike Frysinger, Stephane Carrez,
	Frank Ch . Eigler
  Cc: gdb-patches

Clang generates a warning if the format string of a printf-like function is
not a literal ("-Wformat-nonliteral").  On the default configuration, it
causes a build failure (unless "--disable-werror" is specified).

To avoid warnings on the printf-like wrapper, it requires proper
__attribute__((format)) and we have ATTRIBUTE_PRINTF macro for this reason.

This commit adds ATTRIBUTE_PRINTF to a printf-like function.

sim/ChangeLog:

	* cris/traps.c (cris_unknown_syscall): Add ATTRIBUTE_PRINTF.
---
 sim/cris/traps.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sim/cris/traps.c b/sim/cris/traps.c
index 8750c4d4e3c..3cbbe4088e5 100644
--- a/sim/cris/traps.c
+++ b/sim/cris/traps.c
@@ -1382,7 +1382,7 @@ make_first_thread (SIM_CPU *current_cpu)
 /* Handle unknown system calls.  Returns (if it does) the syscall
    return value.  */
 
-static USI
+static USI ATTRIBUTE_PRINTF(3, 4)
 cris_unknown_syscall (SIM_CPU *current_cpu, USI pc, char *s, ...)
 {
   SIM_DESC sd = CPU_STATE (current_cpu);
-- 
2.34.1


^ permalink raw reply	[flat|nested] 32+ messages in thread

* [PATCH 3/7] sim/erc32: Add ATTRIBUTE_PRINTF
  2022-09-25  8:44 [PATCH 0/7] sim, sim/ARCH: Add ATTRIBUTE_PRINTF Tsukasa OI
  2022-09-25  8:44 ` [PATCH 1/7] sim: " Tsukasa OI
  2022-09-25  8:44 ` [PATCH 2/7] sim/cris: " Tsukasa OI
@ 2022-09-25  8:44 ` Tsukasa OI
  2022-09-25  8:44 ` [PATCH 4/7] sim/m32c: " Tsukasa OI
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 32+ messages in thread
From: Tsukasa OI @ 2022-09-25  8:44 UTC (permalink / raw)
  To: Tsukasa OI, Andrew Burgess, Mike Frysinger, Stephane Carrez,
	Frank Ch . Eigler
  Cc: gdb-patches

Clang generates a warning if the format string of a printf-like function is
not a literal ("-Wformat-nonliteral").  On the default configuration, it
causes a build failure (unless "--disable-werror" is specified).

To avoid warnings on the printf-like wrapper, it requires proper
__attribute__((format)) and we have ATTRIBUTE_PRINTF macro for this reason.

This commit adds ATTRIBUTE_PRINTF to the printf-like functions.

sim/ChangeLog:

	* erc32/interf.c (fprintf_styled): Add ATTRIBUTE_PRINTF.
	* erc32/sis.c (fprintf_styled): Likewise.
---
 sim/erc32/interf.c | 2 +-
 sim/erc32/sis.c    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/sim/erc32/interf.c b/sim/erc32/interf.c
index f433b9d55ac..fe8e9e822dd 100644
--- a/sim/erc32/interf.c
+++ b/sim/erc32/interf.c
@@ -156,7 +156,7 @@ run_sim(struct pstate *sregs, uint64_t icount, int dis)
     return TIME_OUT;
 }
 
-static int
+static int ATTRIBUTE_PRINTF(3, 4)
 fprintf_styled (void *stream, enum disassembler_style style,
 		const char *fmt, ...)
 {
diff --git a/sim/erc32/sis.c b/sim/erc32/sis.c
index 1d3ea139c23..d66f5c4dc9e 100644
--- a/sim/erc32/sis.c
+++ b/sim/erc32/sis.c
@@ -138,7 +138,7 @@ run_sim(struct pstate *sregs, uint64_t icount, int dis)
     return TIME_OUT;
 }
 
-static int
+static int ATTRIBUTE_PRINTF(3, 4)
 fprintf_styled (void *stream, enum disassembler_style style,
 		const char *fmt, ...)
 {
-- 
2.34.1


^ permalink raw reply	[flat|nested] 32+ messages in thread

* [PATCH 4/7] sim/m32c: Add ATTRIBUTE_PRINTF
  2022-09-25  8:44 [PATCH 0/7] sim, sim/ARCH: Add ATTRIBUTE_PRINTF Tsukasa OI
                   ` (2 preceding siblings ...)
  2022-09-25  8:44 ` [PATCH 3/7] sim/erc32: " Tsukasa OI
@ 2022-09-25  8:44 ` Tsukasa OI
  2022-09-25  8:44 ` [PATCH 5/7] sim/m68hc11: " Tsukasa OI
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 32+ messages in thread
From: Tsukasa OI @ 2022-09-25  8:44 UTC (permalink / raw)
  To: Tsukasa OI, Andrew Burgess, Mike Frysinger, Stephane Carrez,
	Frank Ch . Eigler
  Cc: gdb-patches

Clang generates a warning if the format string of a printf-like function is
not a literal ("-Wformat-nonliteral").  On the default configuration, it
causes a build failure (unless "--disable-werror" is specified).

To avoid warnings on the printf-like wrapper, it requires proper
__attribute__((format)) and we have ATTRIBUTE_PRINTF macro for this reason.

This commit adds ATTRIBUTE_PRINTF to the printf-like functions.

sim/ChangeLog:

	* m32c/trace.c (op_printf, op_styled_printf): Add
	ATTRIBUTE_PRINTF.
---
 sim/m32c/trace.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sim/m32c/trace.c b/sim/m32c/trace.c
index 1888e69122b..0aa4440cade 100644
--- a/sim/m32c/trace.c
+++ b/sim/m32c/trace.c
@@ -89,7 +89,7 @@ compare_symbols (const void *ap, const void *bp)
 
 static char opbuf[1000];
 
-static int
+static int ATTRIBUTE_PRINTF(2, 3)
 op_printf (char *buf, char *fmt, ...)
 {
   int ret;
@@ -101,7 +101,7 @@ op_printf (char *buf, char *fmt, ...)
   return ret;
 }
 
-static int
+static int ATTRIBUTE_PRINTF(3, 4)
 op_styled_printf (char *buf, enum disassembler_style style, char *fmt, ...)
 {
   int ret;
-- 
2.34.1


^ permalink raw reply	[flat|nested] 32+ messages in thread

* [PATCH 5/7] sim/m68hc11: Add ATTRIBUTE_PRINTF
  2022-09-25  8:44 [PATCH 0/7] sim, sim/ARCH: Add ATTRIBUTE_PRINTF Tsukasa OI
                   ` (3 preceding siblings ...)
  2022-09-25  8:44 ` [PATCH 4/7] sim/m32c: " Tsukasa OI
@ 2022-09-25  8:44 ` Tsukasa OI
  2022-09-25  8:44 ` [PATCH 6/7] sim/ppc: " Tsukasa OI
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 32+ messages in thread
From: Tsukasa OI @ 2022-09-25  8:44 UTC (permalink / raw)
  To: Tsukasa OI, Andrew Burgess, Mike Frysinger, Stephane Carrez,
	Frank Ch . Eigler
  Cc: gdb-patches

Clang generates a warning if the format string of a printf-like function is
not a literal ("-Wformat-nonliteral").  On the default configuration, it
causes a build failure (unless "--disable-werror" is specified).

To avoid warnings on the printf-like wrapper, it requires proper
__attribute__((format)) and we have ATTRIBUTE_PRINTF macro for this reason.

This commit adds ATTRIBUTE_PRINTF to a printf-like function.

sim/ChangeLog:

	* m68hc11/m68hc11_sim.c (sim_memory_error): Add ATTRIBUTE_PRINTF.
	* m68hc11/sim-main.h (sim_memory_error): Likewise.
---
 sim/m68hc11/m68hc11_sim.c | 2 +-
 sim/m68hc11/sim-main.h    | 5 +++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/sim/m68hc11/m68hc11_sim.c b/sim/m68hc11/m68hc11_sim.c
index 6ec45f78206..3f73215f2e2 100644
--- a/sim/m68hc11/m68hc11_sim.c
+++ b/sim/m68hc11/m68hc11_sim.c
@@ -1017,7 +1017,7 @@ cpu_single_step (sim_cpu *cpu)
 }
 
 /* VARARGS */
-void
+void ATTRIBUTE_PRINTF(4, 5)
 sim_memory_error (sim_cpu *cpu, SIM_SIGNAL excep,
 		  uint16_t addr, const char *message, ...)
 {
diff --git a/sim/m68hc11/sim-main.h b/sim/m68hc11/sim-main.h
index e667c33a705..b8e485ebe97 100644
--- a/sim/m68hc11/sim-main.h
+++ b/sim/m68hc11/sim-main.h
@@ -538,8 +538,9 @@ extern void cpu_return (sim_cpu *cpu);
 extern void cpu_set_sp (sim_cpu *cpu, uint16_t val);
 extern int cpu_reset (sim_cpu *cpu);
 extern int cpu_restart (sim_cpu *cpu);
-extern void sim_memory_error (sim_cpu *cpu, SIM_SIGNAL excep,
-                              uint16_t addr, const char *message, ...);
+extern void sim_memory_error (sim_cpu *cpu, SIM_SIGNAL excep, uint16_t addr,
+			      const char *message, ...)
+    ATTRIBUTE_PRINTF (4, 5);
 extern void emul_os (int op, sim_cpu *cpu);
 extern void cpu_interp_m6811 (sim_cpu *cpu);
 extern void cpu_interp_m6812 (sim_cpu *cpu);
-- 
2.34.1


^ permalink raw reply	[flat|nested] 32+ messages in thread

* [PATCH 6/7] sim/ppc: Add ATTRIBUTE_PRINTF
  2022-09-25  8:44 [PATCH 0/7] sim, sim/ARCH: Add ATTRIBUTE_PRINTF Tsukasa OI
                   ` (4 preceding siblings ...)
  2022-09-25  8:44 ` [PATCH 5/7] sim/m68hc11: " Tsukasa OI
@ 2022-09-25  8:44 ` Tsukasa OI
  2022-10-05 10:57   ` Andrew Burgess
  2022-09-25  8:44 ` [PATCH 7/7] sim/rl78: " Tsukasa OI
  2022-10-06  6:36 ` [PATCH v2 0/7] sim, sim/ARCH: " Tsukasa OI
  7 siblings, 1 reply; 32+ messages in thread
From: Tsukasa OI @ 2022-09-25  8:44 UTC (permalink / raw)
  To: Tsukasa OI, Andrew Burgess, Mike Frysinger, Stephane Carrez,
	Frank Ch . Eigler
  Cc: gdb-patches

Clang generates a warning if the format string of a printf-like function is
not a literal ("-Wformat-nonliteral").  On the default configuration, it
causes a build failure (unless "--disable-werror" is specified).

To avoid warnings on the printf-like wrapper, it requires proper
__attribute__((format)) and we have ATTRIBUTE_PRINTF macro for this reason.

This commit adds ATTRIBUTE_PRINTF to the printf-like functions.

sim/ChangeLog:

	* ppc/main.c (error): Add ATTRIBUTE_PRINTF.
	* ppc/misc.c (error, dumpf): Likewise.
	* ppc/sim_calls.c (error): Likewise.
---
 sim/ppc/main.c      | 2 +-
 sim/ppc/misc.c      | 4 ++--
 sim/ppc/sim_calls.c | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/sim/ppc/main.c b/sim/ppc/main.c
index 83b629ec14a..4a88166106f 100644
--- a/sim/ppc/main.c
+++ b/sim/ppc/main.c
@@ -68,7 +68,7 @@ sim_io_printf_filtered(const char *msg, ...)
   va_end(ap);
 }
 
-void
+void ATTRIBUTE_PRINTF(1, 2)
 error (const char *msg, ...)
 {
   va_list ap;
diff --git a/sim/ppc/misc.c b/sim/ppc/misc.c
index 8f2581e3ef3..71cda9fa298 100644
--- a/sim/ppc/misc.c
+++ b/sim/ppc/misc.c
@@ -28,7 +28,7 @@
 #include <stdlib.h>
 #include <string.h>
 
-void
+void ATTRIBUTE_PRINTF(1, 2)
 error (const char *msg, ...)
 {
   va_list ap;
@@ -48,7 +48,7 @@ zalloc(long size)
   return memory;
 }
 
-void
+void ATTRIBUTE_PRINTF(2, 3)
 dumpf (int indent, const char *msg, ...)
 {
   va_list ap;
diff --git a/sim/ppc/sim_calls.c b/sim/ppc/sim_calls.c
index fbc327c94e0..b0ed3d4c3cc 100644
--- a/sim/ppc/sim_calls.c
+++ b/sim/ppc/sim_calls.c
@@ -388,7 +388,7 @@ sim_io_error (SIM_DESC sd, const char *fmt, ...)
 
 /****/
 
-void ATTRIBUTE_NORETURN
+void ATTRIBUTE_NORETURN ATTRIBUTE_PRINTF(1, 2)
 error (const char *msg, ...)
 {
   va_list ap;
-- 
2.34.1


^ permalink raw reply	[flat|nested] 32+ messages in thread

* [PATCH 7/7] sim/rl78: Add ATTRIBUTE_PRINTF
  2022-09-25  8:44 [PATCH 0/7] sim, sim/ARCH: Add ATTRIBUTE_PRINTF Tsukasa OI
                   ` (5 preceding siblings ...)
  2022-09-25  8:44 ` [PATCH 6/7] sim/ppc: " Tsukasa OI
@ 2022-09-25  8:44 ` Tsukasa OI
  2022-10-06  6:36 ` [PATCH v2 0/7] sim, sim/ARCH: " Tsukasa OI
  7 siblings, 0 replies; 32+ messages in thread
From: Tsukasa OI @ 2022-09-25  8:44 UTC (permalink / raw)
  To: Tsukasa OI, Andrew Burgess, Mike Frysinger, Stephane Carrez,
	Frank Ch . Eigler
  Cc: gdb-patches

Clang generates a warning if the format string of a printf-like function is
not a literal ("-Wformat-nonliteral").  On the default configuration, it
causes a build failure (unless "--disable-werror" is specified).

To avoid warnings on the printf-like wrapper, it requires proper
__attribute__((format)) and we have ATTRIBUTE_PRINTF macro for this reason.

This commit adds ATTRIBUTE_PRINTF to the printf-like functions.

sim/ChangeLog:

	* rl78/trace.c (op_printf, op_styled_printf): Add
	ATTRIBUTE_PRINTF.
---
 sim/rl78/trace.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sim/rl78/trace.c b/sim/rl78/trace.c
index 669c2b54615..55a330e0c2b 100644
--- a/sim/rl78/trace.c
+++ b/sim/rl78/trace.c
@@ -92,7 +92,7 @@ compare_symbols (const void *ap, const void *bp)
 
 static char opbuf[1000];
 
-static int
+static int ATTRIBUTE_PRINTF(2, 3)
 op_printf (char *buf, char *fmt, ...)
 {
   int ret;
@@ -104,7 +104,7 @@ op_printf (char *buf, char *fmt, ...)
   return ret;
 }
 
-static int
+static int ATTRIBUTE_PRINTF(3, 4)
 op_styled_printf (char *buf, enum disassembler_style style, char *fmt, ...)
 {
   int ret;
-- 
2.34.1


^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH 6/7] sim/ppc: Add ATTRIBUTE_PRINTF
  2022-09-25  8:44 ` [PATCH 6/7] sim/ppc: " Tsukasa OI
@ 2022-10-05 10:57   ` Andrew Burgess
  2022-10-06  5:32     ` Tsukasa OI
  0 siblings, 1 reply; 32+ messages in thread
From: Andrew Burgess @ 2022-10-05 10:57 UTC (permalink / raw)
  To: Tsukasa OI, Tsukasa OI, Mike Frysinger, Stephane Carrez,
	Frank Ch . Eigler
  Cc: gdb-patches

Tsukasa OI <research_trasio@irq.a4lg.com> writes:

> Clang generates a warning if the format string of a printf-like function is
> not a literal ("-Wformat-nonliteral").  On the default configuration, it
> causes a build failure (unless "--disable-werror" is specified).
>
> To avoid warnings on the printf-like wrapper, it requires proper
> __attribute__((format)) and we have ATTRIBUTE_PRINTF macro for this reason.
>
> This commit adds ATTRIBUTE_PRINTF to the printf-like functions.
>
> sim/ChangeLog:
>
> 	* ppc/main.c (error): Add ATTRIBUTE_PRINTF.
> 	* ppc/misc.c (error, dumpf): Likewise.
> 	* ppc/sim_calls.c (error): Likewise.
> ---
>  sim/ppc/main.c      | 2 +-
>  sim/ppc/misc.c      | 4 ++--
>  sim/ppc/sim_calls.c | 2 +-
>  3 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/sim/ppc/main.c b/sim/ppc/main.c
> index 83b629ec14a..4a88166106f 100644
> --- a/sim/ppc/main.c
> +++ b/sim/ppc/main.c
> @@ -68,7 +68,7 @@ sim_io_printf_filtered(const char *msg, ...)
>    va_end(ap);
>  }
>  
> -void
> +void ATTRIBUTE_PRINTF(1, 2)
>  error (const char *msg, ...)

I notice in this patch, and the previous one, you've added
ATTRIBUTE_PRINTF to both the declaration, and the definition of some
functions.

Is this required?  I thought we only needed the attribute on the
declaration.

In this case this difference is even more pronounced as you've added the
ATTRIBUTE_PRINTF, but the declaration also has ATTRIBUTE_NORETURN, which
you haven't added to the definition.

My preference would be to only have the attributes on the declaration if
that is sufficient.  Could you test that change and see if your build
issues are still resolved.

Thanks,
Andrew


>  {
>    va_list ap;
> diff --git a/sim/ppc/misc.c b/sim/ppc/misc.c
> index 8f2581e3ef3..71cda9fa298 100644
> --- a/sim/ppc/misc.c
> +++ b/sim/ppc/misc.c
> @@ -28,7 +28,7 @@
>  #include <stdlib.h>
>  #include <string.h>
>  
> -void
> +void ATTRIBUTE_PRINTF(1, 2)
>  error (const char *msg, ...)
>  {
>    va_list ap;
> @@ -48,7 +48,7 @@ zalloc(long size)
>    return memory;
>  }
>  
> -void
> +void ATTRIBUTE_PRINTF(2, 3)
>  dumpf (int indent, const char *msg, ...)
>  {
>    va_list ap;
> diff --git a/sim/ppc/sim_calls.c b/sim/ppc/sim_calls.c
> index fbc327c94e0..b0ed3d4c3cc 100644
> --- a/sim/ppc/sim_calls.c
> +++ b/sim/ppc/sim_calls.c
> @@ -388,7 +388,7 @@ sim_io_error (SIM_DESC sd, const char *fmt, ...)
>  
>  /****/
>  
> -void ATTRIBUTE_NORETURN
> +void ATTRIBUTE_NORETURN ATTRIBUTE_PRINTF(1, 2)
>  error (const char *msg, ...)
>  {
>    va_list ap;
> -- 
> 2.34.1


^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH 6/7] sim/ppc: Add ATTRIBUTE_PRINTF
  2022-10-05 10:57   ` Andrew Burgess
@ 2022-10-06  5:32     ` Tsukasa OI
  0 siblings, 0 replies; 32+ messages in thread
From: Tsukasa OI @ 2022-10-06  5:32 UTC (permalink / raw)
  To: Andrew Burgess; +Cc: gdb-patches

On 2022/10/05 19:57, Andrew Burgess wrote:
> Tsukasa OI <research_trasio@irq.a4lg.com> writes:
> 
>> Clang generates a warning if the format string of a printf-like function is
>> not a literal ("-Wformat-nonliteral").  On the default configuration, it
>> causes a build failure (unless "--disable-werror" is specified).
>>
>> To avoid warnings on the printf-like wrapper, it requires proper
>> __attribute__((format)) and we have ATTRIBUTE_PRINTF macro for this reason.
>>
>> This commit adds ATTRIBUTE_PRINTF to the printf-like functions.
>>
>> sim/ChangeLog:
>>
>> 	* ppc/main.c (error): Add ATTRIBUTE_PRINTF.
>> 	* ppc/misc.c (error, dumpf): Likewise.
>> 	* ppc/sim_calls.c (error): Likewise.
>> ---
>>  sim/ppc/main.c      | 2 +-
>>  sim/ppc/misc.c      | 4 ++--
>>  sim/ppc/sim_calls.c | 2 +-
>>  3 files changed, 4 insertions(+), 4 deletions(-)
>>
>> diff --git a/sim/ppc/main.c b/sim/ppc/main.c
>> index 83b629ec14a..4a88166106f 100644
>> --- a/sim/ppc/main.c
>> +++ b/sim/ppc/main.c
>> @@ -68,7 +68,7 @@ sim_io_printf_filtered(const char *msg, ...)
>>    va_end(ap);
>>  }
>>  
>> -void
>> +void ATTRIBUTE_PRINTF(1, 2)
>>  error (const char *msg, ...)
> 
> I notice in this patch, and the previous one, you've added
> ATTRIBUTE_PRINTF to both the declaration, and the definition of some
> functions.
> 
> Is this required?  I thought we only needed the attribute on the
> declaration.
> 
> In this case this difference is even more pronounced as you've added the
> ATTRIBUTE_PRINTF, but the declaration also has ATTRIBUTE_NORETURN, which
> you haven't added to the definition.
> 
> My preference would be to only have the attributes on the declaration if
> that is sufficient.  Could you test that change and see if your build
> issues are still resolved.

Yes, declaration is sufficient.  Because recent "build for Clang"
patches are collection of many attempts so I think I mixed it somewhere.
 In the next version, I'll append this attribute to declarations, not
definitions.

Thanks,
Tsukasa

> 
> Thanks,
> Andrew
> 
> 
>>  {
>>    va_list ap;
>> diff --git a/sim/ppc/misc.c b/sim/ppc/misc.c
>> index 8f2581e3ef3..71cda9fa298 100644
>> --- a/sim/ppc/misc.c
>> +++ b/sim/ppc/misc.c
>> @@ -28,7 +28,7 @@
>>  #include <stdlib.h>
>>  #include <string.h>
>>  
>> -void
>> +void ATTRIBUTE_PRINTF(1, 2)
>>  error (const char *msg, ...)
>>  {
>>    va_list ap;
>> @@ -48,7 +48,7 @@ zalloc(long size)
>>    return memory;
>>  }
>>  
>> -void
>> +void ATTRIBUTE_PRINTF(2, 3)
>>  dumpf (int indent, const char *msg, ...)
>>  {
>>    va_list ap;
>> diff --git a/sim/ppc/sim_calls.c b/sim/ppc/sim_calls.c
>> index fbc327c94e0..b0ed3d4c3cc 100644
>> --- a/sim/ppc/sim_calls.c
>> +++ b/sim/ppc/sim_calls.c
>> @@ -388,7 +388,7 @@ sim_io_error (SIM_DESC sd, const char *fmt, ...)
>>  
>>  /****/
>>  
>> -void ATTRIBUTE_NORETURN
>> +void ATTRIBUTE_NORETURN ATTRIBUTE_PRINTF(1, 2)
>>  error (const char *msg, ...)
>>  {
>>    va_list ap;
>> -- 
>> 2.34.1
> 

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [PATCH v2 0/7] sim, sim/ARCH: Add ATTRIBUTE_PRINTF
  2022-09-25  8:44 [PATCH 0/7] sim, sim/ARCH: Add ATTRIBUTE_PRINTF Tsukasa OI
                   ` (6 preceding siblings ...)
  2022-09-25  8:44 ` [PATCH 7/7] sim/rl78: " Tsukasa OI
@ 2022-10-06  6:36 ` Tsukasa OI
  2022-10-06  6:36   ` [PATCH v2 1/7] sim: " Tsukasa OI
                     ` (7 more replies)
  7 siblings, 8 replies; 32+ messages in thread
From: Tsukasa OI @ 2022-10-06  6:36 UTC (permalink / raw)
  To: Tsukasa OI, Andrew Burgess, Mike Frysinger, Stephane Carrez,
	Frank Ch . Eigler
  Cc: gdb-patches

Hello,

[Background]

When we build Binutils and GDB with Clang, it causes a build failure due to
warnings generated by Clang and the default -Werror configuration.

I MOSTLY managed to make ALL ARCHITECTURE ENABLED Binutils and GDB
-Werror-free on Clang 15.0.0 (note that this does not necessarily mean
warning-free) and this patchset is a part of it (simulator:
printf-like functions).

-   It still requires -Wno-implicit-function-declaration on the
    LatticeMicro32 and M32R simulators.  Except them, most of Binutils / GDB
    components can be built with Clang by default with my tree.
-   I noticed that the assembler is not tested enough (because just with
    --enable-targets=all, it builds only host assembler).

Full Clang 15.0.0 -Werror-free branch in development is available at:
<https://github.com/a4lg/binutils-gdb/tree/clang-nowarn-dev>

Tested configuration:
-   Ubuntu 22.04.1 LTS (x86_64)
-   LLVM / Clang 15.0.0 (built from source)
-   Configuration examples:
    $srcdir/configure \
        --enable-targets=all \
        --enable-multilib --enable-ld --enable-gold --enable-nls \
        CC=clang CXX=clang++ CCLD=clang CXXLD=clang++ \
        CFLAGS='  -O2 -g -Wno-implicit-function-declaration' \
        CXXFLAGS='-O2 -g -Wno-implicit-function-declaration'
    $srcdir/configure \
        --target=riscv64-unknown-linux-gnu \
        --enable-multilib --enable-ld --enable-gold --enable-nls \
        CC=clang CXX=clang++ CCLD=clang CXXLD=clang++ \
        CFLAGS='-O2 -g' CXXFLAGS='-O2 -g'


[About this Patchset]

Clang generates a warning if the format string of a printf-like function is
not a literal ("-Wformat-nonliteral").  On the default configuration, it
causes a build failure (unless "--disable-werror" is specified).

To avoid warnings on the printf-like wrapper, it requires proper
__attribute__((format)) and we have ATTRIBUTE_PRINTF macro for this reason.

This patchset adds ATTRIBUTE_PRINTF to all functions that require
ATTRIBUTE_PRINTF macro.


[Changes: v1 -> v2]

-   We only append ATTRIBUTE_PRINTF at function declarations,
    not definitions (based on the feedback by Andrew Burgess).
-   Fixed indents
-   Removed ChangeLog from commit messages
    (based on the feedback [to another patchset by me] by Bruno Larsen).


Thanks,
Tsukasa




Tsukasa OI (7):
  sim: Add ATTRIBUTE_PRINTF
  sim/cris: Add ATTRIBUTE_PRINTF
  sim/erc32: Add ATTRIBUTE_PRINTF
  sim/m32c: Add ATTRIBUTE_PRINTF
  sim/m68hc11: Add ATTRIBUTE_PRINTF
  sim/ppc: Add ATTRIBUTE_PRINTF
  sim/rl78: Add ATTRIBUTE_PRINTF

 sim/common/sim-utils.c    | 2 +-
 sim/cris/traps.c          | 2 +-
 sim/erc32/interf.c        | 2 +-
 sim/erc32/sis.c           | 2 +-
 sim/m32c/trace.c          | 4 ++--
 sim/m68hc11/m68hc11_sim.c | 2 +-
 sim/ppc/main.c            | 2 +-
 sim/ppc/misc.c            | 4 ++--
 sim/ppc/sim_calls.c       | 2 +-
 sim/rl78/trace.c          | 4 ++--
 10 files changed, 13 insertions(+), 13 deletions(-)


base-commit: a13886e2198beb78b81c59839043b021ce6df78a
-- 
2.34.1


^ permalink raw reply	[flat|nested] 32+ messages in thread

* [PATCH v2 1/7] sim: Add ATTRIBUTE_PRINTF
  2022-10-06  6:36 ` [PATCH v2 0/7] sim, sim/ARCH: " Tsukasa OI
@ 2022-10-06  6:36   ` Tsukasa OI
  2022-10-11 14:24     ` Andrew Burgess
  2022-10-06  6:36   ` [PATCH v2 2/7] sim/cris: " Tsukasa OI
                     ` (6 subsequent siblings)
  7 siblings, 1 reply; 32+ messages in thread
From: Tsukasa OI @ 2022-10-06  6:36 UTC (permalink / raw)
  To: Tsukasa OI, Andrew Burgess, Mike Frysinger, Stephane Carrez,
	Frank Ch . Eigler
  Cc: gdb-patches

Clang generates a warning if the format string of a printf-like function is
not a literal ("-Wformat-nonliteral").  On the default configuration, it
causes a build failure (unless "--disable-werror" is specified).

To avoid warnings on the printf-like wrapper, it requires proper
__attribute__((format)) and we have ATTRIBUTE_PRINTF macro for this reason.

This commit adds ATTRIBUTE_PRINTF to a printf-like function.
---
 sim/common/sim-utils.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sim/common/sim-utils.c b/sim/common/sim-utils.c
index 259b14cce29..f079bb3f330 100644
--- a/sim/common/sim-utils.c
+++ b/sim/common/sim-utils.c
@@ -146,7 +146,7 @@ sim_cpu_msg_prefix (sim_cpu *cpu)
 
 /* Cover fn to sim_io_eprintf.  */
 
-void
+void ATTRIBUTE_PRINTF (2, 3)
 sim_io_eprintf_cpu (sim_cpu *cpu, const char *fmt, ...)
 {
   SIM_DESC sd = CPU_STATE (cpu);
-- 
2.34.1


^ permalink raw reply	[flat|nested] 32+ messages in thread

* [PATCH v2 2/7] sim/cris: Add ATTRIBUTE_PRINTF
  2022-10-06  6:36 ` [PATCH v2 0/7] sim, sim/ARCH: " Tsukasa OI
  2022-10-06  6:36   ` [PATCH v2 1/7] sim: " Tsukasa OI
@ 2022-10-06  6:36   ` Tsukasa OI
  2022-10-06  6:36   ` [PATCH v2 3/7] sim/erc32: " Tsukasa OI
                     ` (5 subsequent siblings)
  7 siblings, 0 replies; 32+ messages in thread
From: Tsukasa OI @ 2022-10-06  6:36 UTC (permalink / raw)
  To: Tsukasa OI, Andrew Burgess, Mike Frysinger, Stephane Carrez,
	Frank Ch . Eigler
  Cc: gdb-patches

Clang generates a warning if the format string of a printf-like function is
not a literal ("-Wformat-nonliteral").  On the default configuration, it
causes a build failure (unless "--disable-werror" is specified).

To avoid warnings on the printf-like wrapper, it requires proper
__attribute__((format)) and we have ATTRIBUTE_PRINTF macro for this reason.

This commit adds ATTRIBUTE_PRINTF to a printf-like function.
---
 sim/cris/traps.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sim/cris/traps.c b/sim/cris/traps.c
index 8750c4d4e3c..7b0140f1c90 100644
--- a/sim/cris/traps.c
+++ b/sim/cris/traps.c
@@ -1382,7 +1382,7 @@ make_first_thread (SIM_CPU *current_cpu)
 /* Handle unknown system calls.  Returns (if it does) the syscall
    return value.  */
 
-static USI
+static USI ATTRIBUTE_PRINTF (3, 4)
 cris_unknown_syscall (SIM_CPU *current_cpu, USI pc, char *s, ...)
 {
   SIM_DESC sd = CPU_STATE (current_cpu);
-- 
2.34.1


^ permalink raw reply	[flat|nested] 32+ messages in thread

* [PATCH v2 3/7] sim/erc32: Add ATTRIBUTE_PRINTF
  2022-10-06  6:36 ` [PATCH v2 0/7] sim, sim/ARCH: " Tsukasa OI
  2022-10-06  6:36   ` [PATCH v2 1/7] sim: " Tsukasa OI
  2022-10-06  6:36   ` [PATCH v2 2/7] sim/cris: " Tsukasa OI
@ 2022-10-06  6:36   ` Tsukasa OI
  2022-10-06  6:36   ` [PATCH v2 4/7] sim/m32c: " Tsukasa OI
                     ` (4 subsequent siblings)
  7 siblings, 0 replies; 32+ messages in thread
From: Tsukasa OI @ 2022-10-06  6:36 UTC (permalink / raw)
  To: Tsukasa OI, Andrew Burgess, Mike Frysinger, Stephane Carrez,
	Frank Ch . Eigler
  Cc: gdb-patches

Clang generates a warning if the format string of a printf-like function is
not a literal ("-Wformat-nonliteral").  On the default configuration, it
causes a build failure (unless "--disable-werror" is specified).

To avoid warnings on the printf-like wrapper, it requires proper
__attribute__((format)) and we have ATTRIBUTE_PRINTF macro for this reason.

This commit adds ATTRIBUTE_PRINTF to the printf-like functions.
---
 sim/erc32/interf.c | 2 +-
 sim/erc32/sis.c    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/sim/erc32/interf.c b/sim/erc32/interf.c
index f433b9d55ac..aa3ffdc7ada 100644
--- a/sim/erc32/interf.c
+++ b/sim/erc32/interf.c
@@ -156,7 +156,7 @@ run_sim(struct pstate *sregs, uint64_t icount, int dis)
     return TIME_OUT;
 }
 
-static int
+static int ATTRIBUTE_PRINTF (3, 4)
 fprintf_styled (void *stream, enum disassembler_style style,
 		const char *fmt, ...)
 {
diff --git a/sim/erc32/sis.c b/sim/erc32/sis.c
index 1d3ea139c23..f89280b7c0c 100644
--- a/sim/erc32/sis.c
+++ b/sim/erc32/sis.c
@@ -138,7 +138,7 @@ run_sim(struct pstate *sregs, uint64_t icount, int dis)
     return TIME_OUT;
 }
 
-static int
+static int ATTRIBUTE_PRINTF (3, 4)
 fprintf_styled (void *stream, enum disassembler_style style,
 		const char *fmt, ...)
 {
-- 
2.34.1


^ permalink raw reply	[flat|nested] 32+ messages in thread

* [PATCH v2 4/7] sim/m32c: Add ATTRIBUTE_PRINTF
  2022-10-06  6:36 ` [PATCH v2 0/7] sim, sim/ARCH: " Tsukasa OI
                     ` (2 preceding siblings ...)
  2022-10-06  6:36   ` [PATCH v2 3/7] sim/erc32: " Tsukasa OI
@ 2022-10-06  6:36   ` Tsukasa OI
  2022-10-06  6:36   ` [PATCH v2 5/7] sim/m68hc11: " Tsukasa OI
                     ` (3 subsequent siblings)
  7 siblings, 0 replies; 32+ messages in thread
From: Tsukasa OI @ 2022-10-06  6:36 UTC (permalink / raw)
  To: Tsukasa OI, Andrew Burgess, Mike Frysinger, Stephane Carrez,
	Frank Ch . Eigler
  Cc: gdb-patches

Clang generates a warning if the format string of a printf-like function is
not a literal ("-Wformat-nonliteral").  On the default configuration, it
causes a build failure (unless "--disable-werror" is specified).

To avoid warnings on the printf-like wrapper, it requires proper
__attribute__((format)) and we have ATTRIBUTE_PRINTF macro for this reason.

This commit adds ATTRIBUTE_PRINTF to the printf-like functions.
---
 sim/m32c/trace.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sim/m32c/trace.c b/sim/m32c/trace.c
index 1888e69122b..2f6373dd5f8 100644
--- a/sim/m32c/trace.c
+++ b/sim/m32c/trace.c
@@ -89,7 +89,7 @@ compare_symbols (const void *ap, const void *bp)
 
 static char opbuf[1000];
 
-static int
+static int ATTRIBUTE_PRINTF (2, 3)
 op_printf (char *buf, char *fmt, ...)
 {
   int ret;
@@ -101,7 +101,7 @@ op_printf (char *buf, char *fmt, ...)
   return ret;
 }
 
-static int
+static int ATTRIBUTE_PRINTF (3, 4)
 op_styled_printf (char *buf, enum disassembler_style style, char *fmt, ...)
 {
   int ret;
-- 
2.34.1


^ permalink raw reply	[flat|nested] 32+ messages in thread

* [PATCH v2 5/7] sim/m68hc11: Add ATTRIBUTE_PRINTF
  2022-10-06  6:36 ` [PATCH v2 0/7] sim, sim/ARCH: " Tsukasa OI
                     ` (3 preceding siblings ...)
  2022-10-06  6:36   ` [PATCH v2 4/7] sim/m32c: " Tsukasa OI
@ 2022-10-06  6:36   ` Tsukasa OI
  2022-10-11 14:25     ` Andrew Burgess
  2022-10-06  6:36   ` [PATCH v2 6/7] sim/ppc: " Tsukasa OI
                     ` (2 subsequent siblings)
  7 siblings, 1 reply; 32+ messages in thread
From: Tsukasa OI @ 2022-10-06  6:36 UTC (permalink / raw)
  To: Tsukasa OI, Andrew Burgess, Mike Frysinger, Stephane Carrez,
	Frank Ch . Eigler
  Cc: gdb-patches

Clang generates a warning if the format string of a printf-like function is
not a literal ("-Wformat-nonliteral").  On the default configuration, it
causes a build failure (unless "--disable-werror" is specified).

To avoid warnings on the printf-like wrapper, it requires proper
__attribute__((format)) and we have ATTRIBUTE_PRINTF macro for this reason.

This commit adds ATTRIBUTE_PRINTF to a printf-like function.
---
 sim/m68hc11/m68hc11_sim.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sim/m68hc11/m68hc11_sim.c b/sim/m68hc11/m68hc11_sim.c
index 6ec45f78206..2770f17262a 100644
--- a/sim/m68hc11/m68hc11_sim.c
+++ b/sim/m68hc11/m68hc11_sim.c
@@ -1017,7 +1017,7 @@ cpu_single_step (sim_cpu *cpu)
 }
 
 /* VARARGS */
-void
+void ATTRIBUTE_PRINTF (4, 5)
 sim_memory_error (sim_cpu *cpu, SIM_SIGNAL excep,
 		  uint16_t addr, const char *message, ...)
 {
-- 
2.34.1


^ permalink raw reply	[flat|nested] 32+ messages in thread

* [PATCH v2 6/7] sim/ppc: Add ATTRIBUTE_PRINTF
  2022-10-06  6:36 ` [PATCH v2 0/7] sim, sim/ARCH: " Tsukasa OI
                     ` (4 preceding siblings ...)
  2022-10-06  6:36   ` [PATCH v2 5/7] sim/m68hc11: " Tsukasa OI
@ 2022-10-06  6:36   ` Tsukasa OI
  2022-10-11 14:27     ` Andrew Burgess
  2022-10-06  6:36   ` [PATCH v2 7/7] sim/rl78: " Tsukasa OI
  2022-10-11 14:23   ` [PATCH v2 0/7] sim, sim/ARCH: " Andrew Burgess
  7 siblings, 1 reply; 32+ messages in thread
From: Tsukasa OI @ 2022-10-06  6:36 UTC (permalink / raw)
  To: Tsukasa OI, Andrew Burgess, Mike Frysinger, Stephane Carrez,
	Frank Ch . Eigler
  Cc: gdb-patches

Clang generates a warning if the format string of a printf-like function is
not a literal ("-Wformat-nonliteral").  On the default configuration, it
causes a build failure (unless "--disable-werror" is specified).

To avoid warnings on the printf-like wrapper, it requires proper
__attribute__((format)) and we have ATTRIBUTE_PRINTF macro for this reason.

This commit adds ATTRIBUTE_PRINTF to the printf-like functions.
---
 sim/ppc/main.c      | 2 +-
 sim/ppc/misc.c      | 4 ++--
 sim/ppc/sim_calls.c | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/sim/ppc/main.c b/sim/ppc/main.c
index 83b629ec14a..04b2953762e 100644
--- a/sim/ppc/main.c
+++ b/sim/ppc/main.c
@@ -68,7 +68,7 @@ sim_io_printf_filtered(const char *msg, ...)
   va_end(ap);
 }
 
-void
+void ATTRIBUTE_PRINTF (1, 2)
 error (const char *msg, ...)
 {
   va_list ap;
diff --git a/sim/ppc/misc.c b/sim/ppc/misc.c
index 8f2581e3ef3..b8b11bcfe2f 100644
--- a/sim/ppc/misc.c
+++ b/sim/ppc/misc.c
@@ -28,7 +28,7 @@
 #include <stdlib.h>
 #include <string.h>
 
-void
+void ATTRIBUTE_PRINTF (1, 2)
 error (const char *msg, ...)
 {
   va_list ap;
@@ -48,7 +48,7 @@ zalloc(long size)
   return memory;
 }
 
-void
+void ATTRIBUTE_PRINTF (2, 3)
 dumpf (int indent, const char *msg, ...)
 {
   va_list ap;
diff --git a/sim/ppc/sim_calls.c b/sim/ppc/sim_calls.c
index fbc327c94e0..24aeec3f298 100644
--- a/sim/ppc/sim_calls.c
+++ b/sim/ppc/sim_calls.c
@@ -388,7 +388,7 @@ sim_io_error (SIM_DESC sd, const char *fmt, ...)
 
 /****/
 
-void ATTRIBUTE_NORETURN
+void ATTRIBUTE_NORETURN ATTRIBUTE_PRINTF (1, 2)
 error (const char *msg, ...)
 {
   va_list ap;
-- 
2.34.1


^ permalink raw reply	[flat|nested] 32+ messages in thread

* [PATCH v2 7/7] sim/rl78: Add ATTRIBUTE_PRINTF
  2022-10-06  6:36 ` [PATCH v2 0/7] sim, sim/ARCH: " Tsukasa OI
                     ` (5 preceding siblings ...)
  2022-10-06  6:36   ` [PATCH v2 6/7] sim/ppc: " Tsukasa OI
@ 2022-10-06  6:36   ` Tsukasa OI
  2022-10-11 14:23   ` [PATCH v2 0/7] sim, sim/ARCH: " Andrew Burgess
  7 siblings, 0 replies; 32+ messages in thread
From: Tsukasa OI @ 2022-10-06  6:36 UTC (permalink / raw)
  To: Tsukasa OI, Andrew Burgess, Mike Frysinger, Stephane Carrez,
	Frank Ch . Eigler
  Cc: gdb-patches

Clang generates a warning if the format string of a printf-like function is
not a literal ("-Wformat-nonliteral").  On the default configuration, it
causes a build failure (unless "--disable-werror" is specified).

To avoid warnings on the printf-like wrapper, it requires proper
__attribute__((format)) and we have ATTRIBUTE_PRINTF macro for this reason.

This commit adds ATTRIBUTE_PRINTF to the printf-like functions.
---
 sim/rl78/trace.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sim/rl78/trace.c b/sim/rl78/trace.c
index 669c2b54615..85880774b14 100644
--- a/sim/rl78/trace.c
+++ b/sim/rl78/trace.c
@@ -92,7 +92,7 @@ compare_symbols (const void *ap, const void *bp)
 
 static char opbuf[1000];
 
-static int
+static int ATTRIBUTE_PRINTF (2, 3)
 op_printf (char *buf, char *fmt, ...)
 {
   int ret;
@@ -104,7 +104,7 @@ op_printf (char *buf, char *fmt, ...)
   return ret;
 }
 
-static int
+static int ATTRIBUTE_PRINTF (3, 4)
 op_styled_printf (char *buf, enum disassembler_style style, char *fmt, ...)
 {
   int ret;
-- 
2.34.1


^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH v2 0/7] sim, sim/ARCH: Add ATTRIBUTE_PRINTF
  2022-10-06  6:36 ` [PATCH v2 0/7] sim, sim/ARCH: " Tsukasa OI
                     ` (6 preceding siblings ...)
  2022-10-06  6:36   ` [PATCH v2 7/7] sim/rl78: " Tsukasa OI
@ 2022-10-11 14:23   ` Andrew Burgess
  7 siblings, 0 replies; 32+ messages in thread
From: Andrew Burgess @ 2022-10-11 14:23 UTC (permalink / raw)
  To: Tsukasa OI, Tsukasa OI, Mike Frysinger, Stephane Carrez,
	Frank Ch . Eigler
  Cc: gdb-patches

Tsukasa OI <research_trasio@irq.a4lg.com> writes:

> Hello,
>
> [Background]
>
> When we build Binutils and GDB with Clang, it causes a build failure due to
> warnings generated by Clang and the default -Werror configuration.
>
> I MOSTLY managed to make ALL ARCHITECTURE ENABLED Binutils and GDB
> -Werror-free on Clang 15.0.0 (note that this does not necessarily mean
> warning-free) and this patchset is a part of it (simulator:
> printf-like functions).
>
> -   It still requires -Wno-implicit-function-declaration on the
>     LatticeMicro32 and M32R simulators.  Except them, most of Binutils / GDB
>     components can be built with Clang by default with my tree.
> -   I noticed that the assembler is not tested enough (because just with
>     --enable-targets=all, it builds only host assembler).
>
> Full Clang 15.0.0 -Werror-free branch in development is available at:
> <https://github.com/a4lg/binutils-gdb/tree/clang-nowarn-dev>
>
> Tested configuration:
> -   Ubuntu 22.04.1 LTS (x86_64)
> -   LLVM / Clang 15.0.0 (built from source)
> -   Configuration examples:
>     $srcdir/configure \
>         --enable-targets=all \
>         --enable-multilib --enable-ld --enable-gold --enable-nls \
>         CC=clang CXX=clang++ CCLD=clang CXXLD=clang++ \
>         CFLAGS='  -O2 -g -Wno-implicit-function-declaration' \
>         CXXFLAGS='-O2 -g -Wno-implicit-function-declaration'
>     $srcdir/configure \
>         --target=riscv64-unknown-linux-gnu \
>         --enable-multilib --enable-ld --enable-gold --enable-nls \
>         CC=clang CXX=clang++ CCLD=clang CXXLD=clang++ \
>         CFLAGS='-O2 -g' CXXFLAGS='-O2 -g'
>
>
> [About this Patchset]
>
> Clang generates a warning if the format string of a printf-like function is
> not a literal ("-Wformat-nonliteral").  On the default configuration, it
> causes a build failure (unless "--disable-werror" is specified).
>
> To avoid warnings on the printf-like wrapper, it requires proper
> __attribute__((format)) and we have ATTRIBUTE_PRINTF macro for this reason.
>
> This patchset adds ATTRIBUTE_PRINTF to all functions that require
> ATTRIBUTE_PRINTF macro.
>
>
> [Changes: v1 -> v2]
>
> -   We only append ATTRIBUTE_PRINTF at function declarations,
>     not definitions (based on the feedback by Andrew Burgess).
> -   Fixed indents
> -   Removed ChangeLog from commit messages
>     (based on the feedback [to another patchset by me] by Bruno Larsen).

Thanks for the updated series.  I've now pushed these patches with a few
minor adjustments.  I'll comment on each patch where I made changes.

Thanks,
Andrew


^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH v2 1/7] sim: Add ATTRIBUTE_PRINTF
  2022-10-06  6:36   ` [PATCH v2 1/7] sim: " Tsukasa OI
@ 2022-10-11 14:24     ` Andrew Burgess
  0 siblings, 0 replies; 32+ messages in thread
From: Andrew Burgess @ 2022-10-11 14:24 UTC (permalink / raw)
  To: Tsukasa OI, Tsukasa OI, Mike Frysinger, Stephane Carrez,
	Frank Ch . Eigler
  Cc: gdb-patches

Tsukasa OI <research_trasio@irq.a4lg.com> writes:

> Clang generates a warning if the format string of a printf-like function is
> not a literal ("-Wformat-nonliteral").  On the default configuration, it
> causes a build failure (unless "--disable-werror" is specified).
>
> To avoid warnings on the printf-like wrapper, it requires proper
> __attribute__((format)) and we have ATTRIBUTE_PRINTF macro for this reason.
>
> This commit adds ATTRIBUTE_PRINTF to a printf-like function.
> ---
>  sim/common/sim-utils.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/sim/common/sim-utils.c b/sim/common/sim-utils.c
> index 259b14cce29..f079bb3f330 100644
> --- a/sim/common/sim-utils.c
> +++ b/sim/common/sim-utils.c
> @@ -146,7 +146,7 @@ sim_cpu_msg_prefix (sim_cpu *cpu)
>  
>  /* Cover fn to sim_io_eprintf.  */
>  
> -void
> +void ATTRIBUTE_PRINTF (2, 3)
>  sim_io_eprintf_cpu (sim_cpu *cpu, const char *fmt, ...)
>  {
>    SIM_DESC sd = CPU_STATE (cpu);

I've pushed this patch, but I moved the ATTRIBUTE_PRINTF to the function
declaration.

Thanks,
Andrew

---

commit 7aaf9c03d143802302c49ed70d05766c9cf3cb5b
Author: Tsukasa OI <research_trasio@irq.a4lg.com>
Date:   Thu Oct 6 06:36:27 2022 +0000

    sim/common: Add ATTRIBUTE_PRINTF
    
    Clang generates a warning if the format string of a printf-like function is
    not a literal ("-Wformat-nonliteral").  On the default configuration, it
    causes a build failure (unless "--disable-werror" is specified).
    
    To avoid warnings on the printf-like wrapper, it requires proper
    __attribute__((format)) and we have ATTRIBUTE_PRINTF macro for this reason.
    
    This commit adds ATTRIBUTE_PRINTF to a printf-like function.

diff --git a/sim/common/sim-cpu.h b/sim/common/sim-cpu.h
index d8b2b9c494a..9e09a55bf81 100644
--- a/sim/common/sim-cpu.h
+++ b/sim/common/sim-cpu.h
@@ -137,7 +137,8 @@ extern sim_cpu *sim_cpu_lookup (SIM_DESC, const char *);
 /* Return prefix to use in cpu specific messages.  */
 extern const char *sim_cpu_msg_prefix (sim_cpu *);
 /* Cover fn to sim_io_eprintf.  */
-extern void sim_io_eprintf_cpu (sim_cpu *, const char *, ...);
+extern void sim_io_eprintf_cpu (sim_cpu *, const char *, ...)
+  ATTRIBUTE_PRINTF (2, 3);
 
 /* Get/set a pc value.  */
 #define CPU_PC_GET(cpu) ((* CPU_PC_FETCH (cpu)) (cpu))


^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH v2 5/7] sim/m68hc11: Add ATTRIBUTE_PRINTF
  2022-10-06  6:36   ` [PATCH v2 5/7] sim/m68hc11: " Tsukasa OI
@ 2022-10-11 14:25     ` Andrew Burgess
  0 siblings, 0 replies; 32+ messages in thread
From: Andrew Burgess @ 2022-10-11 14:25 UTC (permalink / raw)
  To: Tsukasa OI, Tsukasa OI, Mike Frysinger, Stephane Carrez,
	Frank Ch . Eigler
  Cc: gdb-patches

Tsukasa OI <research_trasio@irq.a4lg.com> writes:

> Clang generates a warning if the format string of a printf-like function is
> not a literal ("-Wformat-nonliteral").  On the default configuration, it
> causes a build failure (unless "--disable-werror" is specified).
>
> To avoid warnings on the printf-like wrapper, it requires proper
> __attribute__((format)) and we have ATTRIBUTE_PRINTF macro for this reason.
>
> This commit adds ATTRIBUTE_PRINTF to a printf-like function.
> ---
>  sim/m68hc11/m68hc11_sim.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/sim/m68hc11/m68hc11_sim.c b/sim/m68hc11/m68hc11_sim.c
> index 6ec45f78206..2770f17262a 100644
> --- a/sim/m68hc11/m68hc11_sim.c
> +++ b/sim/m68hc11/m68hc11_sim.c
> @@ -1017,7 +1017,7 @@ cpu_single_step (sim_cpu *cpu)
>  }
>  
>  /* VARARGS */
> -void
> +void ATTRIBUTE_PRINTF (4, 5)
>  sim_memory_error (sim_cpu *cpu, SIM_SIGNAL excep,
>  		  uint16_t addr, const char *message, ...)
>  {

I've pushed this patch, but moved the ATTRIBUTE_PRINTF to the function
declaration.

Thanks,
Andrew

---

commit 7f9495b21380c0184dde72920bcca37be9d76b9d
Author: Tsukasa OI <research_trasio@irq.a4lg.com>
Date:   Thu Oct 6 06:36:31 2022 +0000

    sim/m68hc11: Add ATTRIBUTE_PRINTF
    
    Clang generates a warning if the format string of a printf-like function is
    not a literal ("-Wformat-nonliteral").  On the default configuration, it
    causes a build failure (unless "--disable-werror" is specified).
    
    To avoid warnings on the printf-like wrapper, it requires proper
    __attribute__((format)) and we have ATTRIBUTE_PRINTF macro for this reason.
    
    This commit adds ATTRIBUTE_PRINTF to a printf-like function.

diff --git a/sim/m68hc11/sim-main.h b/sim/m68hc11/sim-main.h
index e667c33a705..78dbd672867 100644
--- a/sim/m68hc11/sim-main.h
+++ b/sim/m68hc11/sim-main.h
@@ -539,7 +539,8 @@ extern void cpu_set_sp (sim_cpu *cpu, uint16_t val);
 extern int cpu_reset (sim_cpu *cpu);
 extern int cpu_restart (sim_cpu *cpu);
 extern void sim_memory_error (sim_cpu *cpu, SIM_SIGNAL excep,
-                              uint16_t addr, const char *message, ...);
+			      uint16_t addr, const char *message, ...)
+  ATTRIBUTE_PRINTF (4, 5);
 extern void emul_os (int op, sim_cpu *cpu);
 extern void cpu_interp_m6811 (sim_cpu *cpu);
 extern void cpu_interp_m6812 (sim_cpu *cpu);


^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH v2 6/7] sim/ppc: Add ATTRIBUTE_PRINTF
  2022-10-06  6:36   ` [PATCH v2 6/7] sim/ppc: " Tsukasa OI
@ 2022-10-11 14:27     ` Andrew Burgess
  2022-10-12  8:29       ` Jan-Benedict Glaw
  0 siblings, 1 reply; 32+ messages in thread
From: Andrew Burgess @ 2022-10-11 14:27 UTC (permalink / raw)
  To: Tsukasa OI, Tsukasa OI, Mike Frysinger, Stephane Carrez,
	Frank Ch . Eigler
  Cc: gdb-patches

Tsukasa OI <research_trasio@irq.a4lg.com> writes:

> Clang generates a warning if the format string of a printf-like function is
> not a literal ("-Wformat-nonliteral").  On the default configuration, it
> causes a build failure (unless "--disable-werror" is specified).
>
> To avoid warnings on the printf-like wrapper, it requires proper
> __attribute__((format)) and we have ATTRIBUTE_PRINTF macro for this reason.
>
> This commit adds ATTRIBUTE_PRINTF to the printf-like functions.

I've pushed this patch, but I moved all the ATTRIBUTE_PRINTF attributes
to the function declarations.

Also, one of the definitions already had an ATTRIBUTE_NORETURN, I moved
this to the declaration too.

Thanks,
Andrew

---

commit 3efe5b4d9e431f58a17e38d17419d6bcc3a4dd11
Author: Tsukasa OI <research_trasio@irq.a4lg.com>
Date:   Thu Oct 6 06:36:32 2022 +0000

    sim/ppc: Add ATTRIBUTE_PRINTF
    
    Clang generates a warning if the format string of a printf-like function is
    not a literal ("-Wformat-nonliteral").  On the default configuration, it
    causes a build failure (unless "--disable-werror" is specified).
    
    To avoid warnings on the printf-like wrapper, it requires proper
    __attribute__((format)) and we have ATTRIBUTE_PRINTF macro for this reason.
    
    This commit adds ATTRIBUTE_PRINTF to the printf-like functions.
    
    For the error function defined in sim_calls.c, the ATTRIBUTE_NORETURN
    has been moved to the function declaration.

diff --git a/sim/ppc/misc.h b/sim/ppc/misc.h
index 784ccfdd37b..08309134337 100644
--- a/sim/ppc/misc.h
+++ b/sim/ppc/misc.h
@@ -30,8 +30,8 @@
 #include "ansidecl.h"
 #include "filter_filename.h"
 
-extern void error
-(const char *msg, ...);
+extern void error (const char *msg, ...)
+  ATTRIBUTE_NORETURN ATTRIBUTE_PRINTF (1, 2);
 
 #define ASSERT(EXPRESSION) \
 do { \
@@ -47,8 +47,8 @@ do { \
 extern void *zalloc
 (long size);
 
-extern void dumpf
-(int indent, const char *msg, ...);
+extern void dumpf (int indent, const char *msg, ...)
+  ATTRIBUTE_PRINTF (2, 3);
 
 extern unsigned target_a2i
 (int ms_bit_nr,
diff --git a/sim/ppc/sim_callbacks.h b/sim/ppc/sim_callbacks.h
index 08ccd258569..c5f23bf8d64 100644
--- a/sim/ppc/sim_callbacks.h
+++ b/sim/ppc/sim_callbacks.h
@@ -31,9 +31,8 @@
 void sim_io_printf_filtered
 (const char *msg, ...) ATTRIBUTE_PRINTF_1;
 
-void ATTRIBUTE_NORETURN error
-(const char *msg, ...);
-
+extern void error (const char *msg, ...)
+  ATTRIBUTE_NORETURN ATTRIBUTE_PRINTF (1, 2);
 
 /* External environment:
 
diff --git a/sim/ppc/sim_calls.c b/sim/ppc/sim_calls.c
index fbc327c94e0..729f6dcb6f3 100644
--- a/sim/ppc/sim_calls.c
+++ b/sim/ppc/sim_calls.c
@@ -388,7 +388,7 @@ sim_io_error (SIM_DESC sd, const char *fmt, ...)
 
 /****/
 
-void ATTRIBUTE_NORETURN
+void
 error (const char *msg, ...)
 {
   va_list ap;


^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH v2 6/7] sim/ppc: Add ATTRIBUTE_PRINTF
  2022-10-11 14:27     ` Andrew Burgess
@ 2022-10-12  8:29       ` Jan-Benedict Glaw
  2022-10-12  9:39         ` Andrew Burgess
  0 siblings, 1 reply; 32+ messages in thread
From: Jan-Benedict Glaw @ 2022-10-12  8:29 UTC (permalink / raw)
  To: Andrew Burgess
  Cc: Tsukasa OI, Mike Frysinger, Stephane Carrez, Frank Ch . Eigler,
	gdb-patches

[-- Attachment #1: Type: text/plain, Size: 3265 bytes --]

On Tue, 2022-10-11 15:27:30 +0100, Andrew Burgess via Gdb-patches <gdb-patches@sourceware.org> wrote:
> Tsukasa OI <research_trasio@irq.a4lg.com> writes:
> 
> > Clang generates a warning if the format string of a printf-like function is
> > not a literal ("-Wformat-nonliteral").  On the default configuration, it
> > causes a build failure (unless "--disable-werror" is specified).
> >
> > To avoid warnings on the printf-like wrapper, it requires proper
> > __attribute__((format)) and we have ATTRIBUTE_PRINTF macro for this reason.
> >
> > This commit adds ATTRIBUTE_PRINTF to the printf-like functions.
> 
> I've pushed this patch, but I moved all the ATTRIBUTE_PRINTF attributes
> to the function declarations.
> 
> Also, one of the definitions already had an ATTRIBUTE_NORETURN, I moved
> this to the declaration too.

Building with a recent GCC, I get this:

$ .../configure --prefix=/tmp/gdb-ppc-elf --target=ppc-elf
$ make V=1 all-gdb
[...]
/usr/lib/gcc-snapshot/bin/gcc -c -g -O2   -Werror -DDEFAULT_INLINE=0 -DWITH_SMP=5        -DHAVE_TERMIOS_STRUCTURE -DHAVE_TERMIOS_CLINE -DHAVE_DEVZERO -Wall -Wdeclaration-after-statement -Wpointer-arith -Wno-unused -Wunused-value -Wunused-function -Wno-switch -Wno-char-subscripts -Wempty-body -Wunused-but-set-parameter -Wno-error=maybe-uninitialized -Wmissing-declarations -Wmissing-prototypes -Wdeclaration-after-statement -Wmissing-parameter-type -Wpointer-sign -Wold-style-declaration -I. -I. -I./../../include -I../../bfd -I./../../bfd -I../../gdb -I./../../gdb  -I./../../gdb/config -I../.. -I./../../gnulib/import -I../../gnulib/import  -DHAVE_COMMON_FPU -I../common -I./../common emul_generic.c
/usr/lib/gcc-snapshot/bin/gcc -c -g -O2   -Werror -DDEFAULT_INLINE=0 -DWITH_SMP=5        -DHAVE_TERMIOS_STRUCTURE -DHAVE_TERMIOS_CLINE -DHAVE_DEVZERO -Wall -Wdeclaration-after-statement -Wpointer-arith -Wno-unused -Wunused-value -Wunused-function -Wno-switch -Wno-char-subscripts -Wempty-body -Wunused-but-set-parameter -Wno-error=maybe-uninitialized -Wmissing-declarations -Wmissing-prototypes -Wdeclaration-after-statement -Wmissing-parameter-type -Wpointer-sign -Wold-style-declaration -I. -I. -I./../../include -I../../bfd -I./../../bfd -I../../gdb -I./../../gdb  -I./../../gdb/config -I../.. -I./../../gnulib/import -I../../gnulib/import  -DHAVE_COMMON_FPU -I../common -I./../common emul_bugapi.c
emul_bugapi.c: In function 'emul_bugapi_instruction_call':
emul_bugapi.c:495:11: error: format '%lx' expects argument of type 'long unsigned int', but argument 3 has type 'spreg' {aka 'unsigned int'} [-Werror=format=]
  495 |     error("emul-bugapi: unimplemented bugapi %s from address 0x%lx\n",
      |           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[3]: *** [Makefile:144: emul_bugapi.o] Error 1
make[3]: Leaving directory '/var/lib/laminar/run/gdb-ppc-elf/6/binutils-gdb/sim/ppc'
make[2]: *** [Makefile:1933: all-recursive] Error 1
make[2]: Leaving directory '/var/lib/laminar/run/gdb-ppc-elf/6/binutils-gdb/sim'
make[1]: *** [Makefile:1185: all] Error 2
make[1]: Leaving directory '/var/lib/laminar/run/gdb-ppc-elf/6/binutils-gdb/sim'
make: *** [Makefile:11309: all-sim] Error 2

MfG, JBG

-- 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH v2 6/7] sim/ppc: Add ATTRIBUTE_PRINTF
  2022-10-12  8:29       ` Jan-Benedict Glaw
@ 2022-10-12  9:39         ` Andrew Burgess
  2022-10-12 10:36           ` Jan-Benedict Glaw
                             ` (2 more replies)
  0 siblings, 3 replies; 32+ messages in thread
From: Andrew Burgess @ 2022-10-12  9:39 UTC (permalink / raw)
  To: Jan-Benedict Glaw
  Cc: Tsukasa OI, Mike Frysinger, Stephane Carrez, Frank Ch . Eigler,
	gdb-patches

Jan-Benedict Glaw <jbglaw@lug-owl.de> writes:

> On Tue, 2022-10-11 15:27:30 +0100, Andrew Burgess via Gdb-patches <gdb-patches@sourceware.org> wrote:
>> Tsukasa OI <research_trasio@irq.a4lg.com> writes:
>> 
>> > Clang generates a warning if the format string of a printf-like function is
>> > not a literal ("-Wformat-nonliteral").  On the default configuration, it
>> > causes a build failure (unless "--disable-werror" is specified).
>> >
>> > To avoid warnings on the printf-like wrapper, it requires proper
>> > __attribute__((format)) and we have ATTRIBUTE_PRINTF macro for this reason.
>> >
>> > This commit adds ATTRIBUTE_PRINTF to the printf-like functions.
>> 
>> I've pushed this patch, but I moved all the ATTRIBUTE_PRINTF attributes
>> to the function declarations.
>> 
>> Also, one of the definitions already had an ATTRIBUTE_NORETURN, I moved
>> this to the declaration too.
>
> Building with a recent GCC, I get this:
>
> $ .../configure --prefix=/tmp/gdb-ppc-elf --target=ppc-elf
> $ make V=1 all-gdb
> [...]
> /usr/lib/gcc-snapshot/bin/gcc -c -g -O2   -Werror -DDEFAULT_INLINE=0 -DWITH_SMP=5        -DHAVE_TERMIOS_STRUCTURE -DHAVE_TERMIOS_CLINE -DHAVE_DEVZERO -Wall -Wdeclaration-after-statement -Wpointer-arith -Wno-unused -Wunused-value -Wunused-function -Wno-switch -Wno-char-subscripts -Wempty-body -Wunused-but-set-parameter -Wno-error=maybe-uninitialized -Wmissing-declarations -Wmissing-prototypes -Wdeclaration-after-statement -Wmissing-parameter-type -Wpointer-sign -Wold-style-declaration -I. -I. -I./../../include -I../../bfd -I./../../bfd -I../../gdb -I./../../gdb  -I./../../gdb/config -I../.. -I./../../gnulib/import -I../../gnulib/import  -DHAVE_COMMON_FPU -I../common -I./../common emul_generic.c
> /usr/lib/gcc-snapshot/bin/gcc -c -g -O2   -Werror -DDEFAULT_INLINE=0 -DWITH_SMP=5        -DHAVE_TERMIOS_STRUCTURE -DHAVE_TERMIOS_CLINE -DHAVE_DEVZERO -Wall -Wdeclaration-after-statement -Wpointer-arith -Wno-unused -Wunused-value -Wunused-function -Wno-switch -Wno-char-subscripts -Wempty-body -Wunused-but-set-parameter -Wno-error=maybe-uninitialized -Wmissing-declarations -Wmissing-prototypes -Wdeclaration-after-statement -Wmissing-parameter-type -Wpointer-sign -Wold-style-declaration -I. -I. -I./../../include -I../../bfd -I./../../bfd -I../../gdb -I./../../gdb  -I./../../gdb/config -I../.. -I./../../gnulib/import -I../../gnulib/import  -DHAVE_COMMON_FPU -I../common -I./../common emul_bugapi.c
> emul_bugapi.c: In function 'emul_bugapi_instruction_call':
> emul_bugapi.c:495:11: error: format '%lx' expects argument of type 'long unsigned int', but argument 3 has type 'spreg' {aka 'unsigned int'} [-Werror=format=]
>   495 |     error("emul-bugapi: unimplemented bugapi %s from address 0x%lx\n",
>       |           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> cc1: all warnings being treated as errors
> make[3]: *** [Makefile:144: emul_bugapi.o] Error 1
> make[3]: Leaving directory '/var/lib/laminar/run/gdb-ppc-elf/6/binutils-gdb/sim/ppc'
> make[2]: *** [Makefile:1933: all-recursive] Error 1
> make[2]: Leaving directory '/var/lib/laminar/run/gdb-ppc-elf/6/binutils-gdb/sim'
> make[1]: *** [Makefile:1185: all] Error 2
> make[1]: Leaving directory '/var/lib/laminar/run/gdb-ppc-elf/6/binutils-gdb/sim'
> make: *** [Makefile:11309: all-sim] Error 2

Sorry for the breakage.

I've pushed the patch below, which I think should resolve the issue you
are seeing, as well as some other, similar issues in the ppc sim.

Let me know if you are still seeing build problems with the latest
master.

Thanks,
Andrew

---

commit 182421c9d2eea8c4877d983a2124e591f0aca710
Author: Andrew Burgess <aburgess@redhat.com>
Date:   Tue Oct 11 15:02:08 2022 +0100

    sim/ppc: fixes for arguments to printf style functions
    
    After the recent series of fixes to mark more functions in the
    simulator with ATTRIBUTE_PRINTF, there were some build failures in the
    ppc sim due, in some cases, to bugs with the arguments being passed,
    and in other cases, the issues were (maybe) less serious, with
    arguments being the wrong size, or type, for the printf format being
    used.
    
    This commit fixes all of the issues that I ran into.
    
    In each case I selected the easiest solution to the problem, which is
    usually just casting the argument to the correct type.  If anyone
    later on thinks the print format should change, please feel free to do
    that.  What we have here should keep the simulator basically working
    as it does currently, which is my goal with this commit.

diff --git a/sim/ppc/corefile.c b/sim/ppc/corefile.c
index 1b3eeef8b53..b2faef58c5b 100644
--- a/sim/ppc/corefile.c
+++ b/sim/ppc/corefile.c
@@ -292,8 +292,8 @@ core_map_find_mapping(core_map *map,
     mapping = mapping->next;
   }
   if (abort)
-    error("core_find_mapping() - access to unmaped address, attach a default map to handle this - addr=0x%x nr_bytes=0x%x processor=0x%x cia=0x%x\n",
-	  addr, nr_bytes, processor, cia);
+    error("core_find_mapping() - access to unmaped address, attach a default map to handle this - addr=0x%x nr_bytes=0x%x processor=0x%p cia=0x%x\n",
+	  addr, nr_bytes, (void *) processor, cia);
   return NULL;
 }
 
diff --git a/sim/ppc/emul_bugapi.c b/sim/ppc/emul_bugapi.c
index c3c607b43f0..f4eed443d8b 100644
--- a/sim/ppc/emul_bugapi.c
+++ b/sim/ppc/emul_bugapi.c
@@ -493,7 +493,7 @@ emul_bugapi_instruction_call(cpu *processor,
   switch (call_id) {
   default:
     error("emul-bugapi: unimplemented bugapi %s from address 0x%lx\n",
-	  emul_bugapi_instruction_name (call_id), SRR0);
+	  emul_bugapi_instruction_name (call_id), (unsigned long) SRR0);
     break;
 
   /* read a single character, output r3 = byte */
diff --git a/sim/ppc/emul_chirp.c b/sim/ppc/emul_chirp.c
index 7a585388f63..116f3732ac7 100644
--- a/sim/ppc/emul_chirp.c
+++ b/sim/ppc/emul_chirp.c
@@ -1509,7 +1509,7 @@ map_over_chirp_note(bfd *image,
       return;
     /* check the name field */
     if (head.namesz > sizeof(name)) {
-      error("chirp: note name too long (%d > %d)\n", (int)head.namesz, sizeof(name));
+      error("chirp: note name too long (%d > %d)\n", (int)head.namesz, (int)sizeof(name));
     }
     if (!bfd_get_section_contents(image, sect,
 				  name, sizeof(head), head.namesz)) {
@@ -1971,12 +1971,14 @@ emul_chirp_instruction_call(cpu *processor,
     }
     if (emul_data->n_args > 6) { /* See iee1275 requirements on nr returns */
       error("OpenFirmware service %s called from 0x%lx with args 0x%lx, too many args (%d)\n",
+	    service_name,
 	    (unsigned long)emul_data->return_address,
 	    (unsigned long)emul_data->arguments,
 	    emul_data->n_returns);
     }
     if (emul_data->n_returns > 6) {
       error("OpenFirmware service %s called from 0x%lx with args 0x%lx,  with too many returns (%d)\n",
+	    service_name,
 	    (unsigned long)emul_data->return_address,
 	    (unsigned long)emul_data->arguments,
 	    emul_data->n_args);
diff --git a/sim/ppc/interrupts.c b/sim/ppc/interrupts.c
index 133638fdcaf..a33274aa562 100644
--- a/sim/ppc/interrupts.c
+++ b/sim/ppc/interrupts.c
@@ -234,7 +234,7 @@ instruction_storage_interrupt(cpu *processor,
 	break;
       default:
 	srr1_set = 0;
-	error("internal error - instruction_storage_interrupt - reason %d not implemented");
+	error("internal error - instruction_storage_interrupt - reason %d not implemented", reason);
 	break;
       }
       TRACE(trace_interrupts, ("instruction storage interrupt - cia=0x%lx SRR1|=0x%lx\n",
diff --git a/sim/ppc/psim.c b/sim/ppc/psim.c
index 9f1db675e50..acc40edf8aa 100644
--- a/sim/ppc/psim.c
+++ b/sim/ppc/psim.c
@@ -99,7 +99,7 @@ find_arg(const char *err_msg,
 {
   *ptr_to_argp += 1;
   if (argv[*ptr_to_argp] == NULL)
-    error(err_msg);
+    error("%s", err_msg);
   return argv[*ptr_to_argp];
 }
 
@@ -535,7 +535,7 @@ psim_create(const char *file_name,
   if (ppc_trace[trace_print_device_tree] || ppc_trace[trace_dump_device_tree])
     tree_print(root);
   if (ppc_trace[trace_dump_device_tree])
-    error("");
+    error("%s", "");
 
   return system;
 }
@@ -1186,7 +1186,7 @@ psim_merge_device_file(device *root,
       /* append the next line */
       if (!fgets(device_path + curlen, sizeof(device_path) - curlen, description)) {
 	fclose(description);
-	error("%s:%s: unexpected eof in line continuation - %s",
+	error("%s:%d: unexpected eof in line continuation - %s",
 	      file_name, line_nr, device_path);
       }
       if (strchr(device_path, '\n') == NULL) {


^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH v2 6/7] sim/ppc: Add ATTRIBUTE_PRINTF
  2022-10-12  9:39         ` Andrew Burgess
@ 2022-10-12 10:36           ` Jan-Benedict Glaw
  2022-10-12 12:15             ` Jan-Benedict Glaw
  2022-10-12 12:50             ` Jan-Benedict Glaw
  2022-10-12 12:38           ` [PATCH 0/1] sim/ppc: Fix erroneous error calls (supplement) Tsukasa OI
  2022-10-23 12:46           ` [PATCH v2 6/7] sim/ppc: Add ATTRIBUTE_PRINTF Mike Frysinger
  2 siblings, 2 replies; 32+ messages in thread
From: Jan-Benedict Glaw @ 2022-10-12 10:36 UTC (permalink / raw)
  To: Andrew Burgess
  Cc: Tsukasa OI, Mike Frysinger, Stephane Carrez, Frank Ch . Eigler,
	gdb-patches

[-- Attachment #1: Type: text/plain, Size: 3087 bytes --]

On Wed, 2022-10-12 10:39:25 +0100, Andrew Burgess <aburgess@redhat.com> wrote:
> Jan-Benedict Glaw <jbglaw@lug-owl.de> writes:
> > Building with a recent GCC, I get this:
> >
> > $ .../configure --prefix=/tmp/gdb-ppc-elf --target=ppc-elf
> > $ make V=1 all-gdb
> > [...]
> > /usr/lib/gcc-snapshot/bin/gcc -c -g -O2   -Werror -DDEFAULT_INLINE=0 -DWITH_SMP=5        -DHAVE_TERMIOS_STRUCTURE -DHAVE_TERMIOS_CLINE -DHAVE_DEVZERO -Wall -Wdeclaration-after-statement -Wpointer-arith -Wno-unused -Wunused-value -Wunused-function -Wno-switch -Wno-char-subscripts -Wempty-body -Wunused-but-set-parameter -Wno-error=maybe-uninitialized -Wmissing-declarations -Wmissing-prototypes -Wdeclaration-after-statement -Wmissing-parameter-type -Wpointer-sign -Wold-style-declaration -I. -I. -I./../../include -I../../bfd -I./../../bfd -I../../gdb -I./../../gdb  -I./../../gdb/config -I../.. -I./../../gnulib/import -I../../gnulib/import  -DHAVE_COMMON_FPU -I../common -I./../common emul_generic.c
> > /usr/lib/gcc-snapshot/bin/gcc -c -g -O2   -Werror -DDEFAULT_INLINE=0 -DWITH_SMP=5        -DHAVE_TERMIOS_STRUCTURE -DHAVE_TERMIOS_CLINE -DHAVE_DEVZERO -Wall -Wdeclaration-after-statement -Wpointer-arith -Wno-unused -Wunused-value -Wunused-function -Wno-switch -Wno-char-subscripts -Wempty-body -Wunused-but-set-parameter -Wno-error=maybe-uninitialized -Wmissing-declarations -Wmissing-prototypes -Wdeclaration-after-statement -Wmissing-parameter-type -Wpointer-sign -Wold-style-declaration -I. -I. -I./../../include -I../../bfd -I./../../bfd -I../../gdb -I./../../gdb  -I./../../gdb/config -I../.. -I./../../gnulib/import -I../../gnulib/import  -DHAVE_COMMON_FPU -I../common -I./../common emul_bugapi.c
> > emul_bugapi.c: In function 'emul_bugapi_instruction_call':
> > emul_bugapi.c:495:11: error: format '%lx' expects argument of type 'long unsigned int', but argument 3 has type 'spreg' {aka 'unsigned int'} [-Werror=format=]
> >   495 |     error("emul-bugapi: unimplemented bugapi %s from address 0x%lx\n",
> >       |           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > cc1: all warnings being treated as errors
> > make[3]: *** [Makefile:144: emul_bugapi.o] Error 1
> > make[3]: Leaving directory '/var/lib/laminar/run/gdb-ppc-elf/6/binutils-gdb/sim/ppc'
> > make[2]: *** [Makefile:1933: all-recursive] Error 1
> > make[2]: Leaving directory '/var/lib/laminar/run/gdb-ppc-elf/6/binutils-gdb/sim'
> > make[1]: *** [Makefile:1185: all] Error 2
> > make[1]: Leaving directory '/var/lib/laminar/run/gdb-ppc-elf/6/binutils-gdb/sim'
> > make: *** [Makefile:11309: all-sim] Error 2
> 
> Sorry for the breakage.

Nothing to worry about --- that's exactly why I do these mass CI
tests. Catch stuff early!

> I've pushed the patch below, which I think should resolve the issue you
> are seeing, as well as some other, similar issues in the ppc sim.
> 
> Let me know if you are still seeing build problems with the latest
> master.

Just queued another build, will take about an hour. (Not too fast
hardware and many jobs running...)

MfG, JBG

-- 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH v2 6/7] sim/ppc: Add ATTRIBUTE_PRINTF
  2022-10-12 10:36           ` Jan-Benedict Glaw
@ 2022-10-12 12:15             ` Jan-Benedict Glaw
  2022-10-12 12:50             ` Jan-Benedict Glaw
  1 sibling, 0 replies; 32+ messages in thread
From: Jan-Benedict Glaw @ 2022-10-12 12:15 UTC (permalink / raw)
  To: Andrew Burgess; +Cc: Frank Ch . Eigler, gdb-patches

[-- Attachment #1: Type: text/plain, Size: 440 bytes --]

On Wed, 2022-10-12 12:36:49 +0200, Jan-Benedict Glaw <jbglaw@lug-owl.de> wrote:
> On Wed, 2022-10-12 10:39:25 +0100, Andrew Burgess <aburgess@redhat.com> wrote:
> > Let me know if you are still seeing build problems with the latest
> > master.
> 
> Just queued another build, will take about an hour. (Not too fast
> hardware and many jobs running...)

That's all fixed for the target that failed.

Good work!

Thanks, JB
-- 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [PATCH 0/1] sim/ppc: Fix erroneous error calls (supplement)
  2022-10-12  9:39         ` Andrew Burgess
  2022-10-12 10:36           ` Jan-Benedict Glaw
@ 2022-10-12 12:38           ` Tsukasa OI
  2022-10-12 12:38             ` [PATCH 1/1] sim/ppc: Fix core_find_mapping diagnostics Tsukasa OI
  2022-10-23 12:46           ` [PATCH v2 6/7] sim/ppc: Add ATTRIBUTE_PRINTF Mike Frysinger
  2 siblings, 1 reply; 32+ messages in thread
From: Tsukasa OI @ 2022-10-12 12:38 UTC (permalink / raw)
  To: Tsukasa OI, Andrew Burgess, Tom de Vries; +Cc: gdb-patches

Andrew,

Thanks for fixing that!

I was making pretty much the same patch but one minor difference: mine
uses "%p" and Andrew's uses "0x%p" on core_map_find_mapping.  For this
particular location, "%p" is better.

c.f.
<https://pubs.opengroup.org/onlinepubs/9699919799/functions/fprintf.html>

Despite that this difference is insignificant, if we miss this chance, we
will likely leave core_map_find_mapping function for years.  So, I will
submit this when I can.

Thanks,
Tsukasa




Tsukasa OI (1):
  sim/ppc: Fix core_find_mapping diagnostics

 sim/ppc/corefile.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


base-commit: 182421c9d2eea8c4877d983a2124e591f0aca710
-- 
2.34.1


^ permalink raw reply	[flat|nested] 32+ messages in thread

* [PATCH 1/1] sim/ppc: Fix core_find_mapping diagnostics
  2022-10-12 12:38           ` [PATCH 0/1] sim/ppc: Fix erroneous error calls (supplement) Tsukasa OI
@ 2022-10-12 12:38             ` Tsukasa OI
  2022-10-12 13:50               ` Andrew Burgess
  0 siblings, 1 reply; 32+ messages in thread
From: Tsukasa OI @ 2022-10-12 12:38 UTC (permalink / raw)
  To: Tsukasa OI, Andrew Burgess, Tom de Vries; +Cc: gdb-patches

Because "%p" is the pointer conversion specifier to print a pointer in an
implementation-defined manner, the result with format string containing
"0x%p" can be strange.  For instance, core_map_find_mapping prints error
containing "0x0x...." (processor is not NULL) or "0x(null)" (processor is
NULL) on glibc.

This commit replaces "0x%p" with "%p" to prevent unpredictable behavior.
---
 sim/ppc/corefile.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sim/ppc/corefile.c b/sim/ppc/corefile.c
index b2faef58c5b..ee4e2cf733e 100644
--- a/sim/ppc/corefile.c
+++ b/sim/ppc/corefile.c
@@ -292,7 +292,7 @@ core_map_find_mapping(core_map *map,
     mapping = mapping->next;
   }
   if (abort)
-    error("core_find_mapping() - access to unmaped address, attach a default map to handle this - addr=0x%x nr_bytes=0x%x processor=0x%p cia=0x%x\n",
+    error("core_find_mapping() - access to unmaped address, attach a default map to handle this - addr=0x%x nr_bytes=0x%x processor=%p cia=0x%x\n",
 	  addr, nr_bytes, (void *) processor, cia);
   return NULL;
 }
-- 
2.34.1


^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH v2 6/7] sim/ppc: Add ATTRIBUTE_PRINTF
  2022-10-12 10:36           ` Jan-Benedict Glaw
  2022-10-12 12:15             ` Jan-Benedict Glaw
@ 2022-10-12 12:50             ` Jan-Benedict Glaw
  2022-10-12 13:16               ` Tsukasa OI
  1 sibling, 1 reply; 32+ messages in thread
From: Jan-Benedict Glaw @ 2022-10-12 12:50 UTC (permalink / raw)
  To: Andrew Burgess; +Cc: Frank Ch . Eigler, gdb-patches

[-- Attachment #1: Type: text/plain, Size: 45560 bytes --]

On Wed, 2022-10-12 12:36:49 +0200, Jan-Benedict Glaw <jbglaw@lug-owl.de> wrote:
> On Wed, 2022-10-12 10:39:25 +0100, Andrew Burgess <aburgess@redhat.com> wrote:
> > Jan-Benedict Glaw <jbglaw@lug-owl.de> writes:
> > > Building with a recent GCC, I get this:
> > >
> > > $ .../configure --prefix=/tmp/gdb-ppc-elf --target=ppc-elf
> > > $ make V=1 all-gdb
> > > [...]

...while we're at ppc: Should powerpc64-linux_altivec,
powerpc-eabisimaltivec and powerpc-eabialtivec be supported? I think
so, but these all fail with:

+ log_execute cfg ./configure --prefix=/tmp/gdb-powerpc-eabialtivec --target=powerpc-eabialtivec
+ log_execute all make V=1 all-gdb
[...]
[all 2022-10-12 12:30:53] /usr/lib/gcc-snapshot/bin/gcc -c -g -O2   -Werror -DDEFAULT_INLINE=0 -DWITH_SMP=5     -DWITH_ALTIVEC   -DHAVE_TERMIOS_STRUCTURE -DHAVE_TERMIOS_CLINE -DHAVE_DEVZERO -Wall -Wdeclaration-after-statement -Wpointer-arith -Wno-unused -Wunused-value -Wunused-function -Wno-switch -Wno-char-subscripts -Wempty-body -Wunused-but-set-parameter -Wno-error=maybe-uninitialized -Wmissing-declarations -Wmissing-prototypes -Wdeclaration-after-statement -Wmissing-parameter-type -Wpointer-sign -Wold-style-declaration -I. -I. -I./../../include -I../../bfd -I./../../bfd -I../../gdb -I./../../gdb  -I./../../gdb/config -I../.. -I./../../gnulib/import -I../../gnulib/import  -DHAVE_COMMON_FPU -I../common -I./../common icache.c
[all 2022-10-12 12:30:54] altivec.igen: In function 'icache_Vector_Convert_to_Unsigned_FixedPoint_Word_Saturate':
[all 2022-10-12 12:30:54] altivec.igen:1016:31: error: pointer targets in passing argument 1 of 'sim_fpu_to64u' differ in signedness [-Werror=pointer-sign]
[all 2022-10-12 12:30:54]  1016 |           sim_fpu_to64u (&temp, &a, sim_fpu_round_default);
[all 2022-10-12 12:30:54]       |                               ^~~~~
[all 2022-10-12 12:30:54]       |                               |
[all 2022-10-12 12:30:54]       |                               int64_t * {aka long int *}
[all 2022-10-12 12:30:54] In file included from icache.c:33:
[all 2022-10-12 12:30:54] ../common/sim-fpu.h:308:47: note: expected 'uint64_t *' {aka 'long unsigned int *'} but argument is of type 'int64_t *' {aka 'long int *'}
[all 2022-10-12 12:30:54]   308 | INLINE_SIM_FPU (int) sim_fpu_to64u (uint64_t *u, const sim_fpu *f,
[all 2022-10-12 12:30:54]       |                                     ~~~~~~~~~~^
[all 2022-10-12 12:31:21] altivec.igen: In function 'icache_Vector_Multiple_High_and_Add_Signed_Half_Word_Saturate_VC0':
[all 2022-10-12 12:31:21] altivec.igen:1191:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
[all 2022-10-12 12:31:21]  1191 |           sat |= tempsat;
[all 2022-10-12 12:31:21]       |                ~~~~^~~~~~    
[all 2022-10-12 12:31:21] altivec.igen:1181:21: note: 'sat' was declared here
[all 2022-10-12 12:31:21]  1181 |         int i, sat, tempsat;
[all 2022-10-12 12:31:21]       |                     ^~~
[all 2022-10-12 12:31:21] altivec.igen: In function 'icache_Vector_Multiple_High_Round_and_Add_Signed_Half_Word_Saturate_VC0':
[all 2022-10-12 12:31:21] altivec.igen:1208:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
[all 2022-10-12 12:31:21]  1208 |           sat |= tempsat;
[all 2022-10-12 12:31:21]       |                ~~~~^~~~~~    
[all 2022-10-12 12:31:21] altivec.igen:1197:21: note: 'sat' was declared here
[all 2022-10-12 12:31:21]  1197 |         int i, sat, tempsat;
[all 2022-10-12 12:31:21]       |                     ^~~
[all 2022-10-12 12:31:22] altivec.igen: In function 'icache_Vector_Multiple_High_and_Add_Signed_Half_Word_Saturate_VC1':
[all 2022-10-12 12:31:22] altivec.igen:1191:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
[all 2022-10-12 12:31:22]  1191 |           sat |= tempsat;
[all 2022-10-12 12:31:22]       |                ~~~~^~~~~~    
[all 2022-10-12 12:31:22] altivec.igen:1181:21: note: 'sat' was declared here
[all 2022-10-12 12:31:22]  1181 |         int i, sat, tempsat;
[all 2022-10-12 12:31:22]       |                     ^~~
[all 2022-10-12 12:31:22] altivec.igen: In function 'icache_Vector_Multiple_High_Round_and_Add_Signed_Half_Word_Saturate_VC1':
[all 2022-10-12 12:31:22] altivec.igen:1208:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
[all 2022-10-12 12:31:22]  1208 |           sat |= tempsat;
[all 2022-10-12 12:31:22]       |                ~~~~^~~~~~    
[all 2022-10-12 12:31:22] altivec.igen:1197:21: note: 'sat' was declared here
[all 2022-10-12 12:31:22]  1197 |         int i, sat, tempsat;
[all 2022-10-12 12:31:22]       |                     ^~~
[all 2022-10-12 12:31:23] altivec.igen: In function 'icache_Vector_Multiple_High_and_Add_Signed_Half_Word_Saturate_VC2':
[all 2022-10-12 12:31:23] altivec.igen:1191:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
[all 2022-10-12 12:31:23]  1191 |           sat |= tempsat;
[all 2022-10-12 12:31:23]       |                ~~~~^~~~~~    
[all 2022-10-12 12:31:23] altivec.igen:1181:21: note: 'sat' was declared here
[all 2022-10-12 12:31:23]  1181 |         int i, sat, tempsat;
[all 2022-10-12 12:31:23]       |                     ^~~
[all 2022-10-12 12:31:23] altivec.igen: In function 'icache_Vector_Multiple_High_Round_and_Add_Signed_Half_Word_Saturate_VC2':
[all 2022-10-12 12:31:23] altivec.igen:1208:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
[all 2022-10-12 12:31:23]  1208 |           sat |= tempsat;
[all 2022-10-12 12:31:23]       |                ~~~~^~~~~~    
[all 2022-10-12 12:31:23] altivec.igen:1197:21: note: 'sat' was declared here
[all 2022-10-12 12:31:23]  1197 |         int i, sat, tempsat;
[all 2022-10-12 12:31:23]       |                     ^~~
[all 2022-10-12 12:31:24] altivec.igen: In function 'icache_Vector_Multiple_High_and_Add_Signed_Half_Word_Saturate_VC3':
[all 2022-10-12 12:31:24] altivec.igen:1191:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
[all 2022-10-12 12:31:24]  1191 |           sat |= tempsat;
[all 2022-10-12 12:31:24]       |                ~~~~^~~~~~    
[all 2022-10-12 12:31:24] altivec.igen:1181:21: note: 'sat' was declared here
[all 2022-10-12 12:31:24]  1181 |         int i, sat, tempsat;
[all 2022-10-12 12:31:24]       |                     ^~~
[all 2022-10-12 12:31:25] altivec.igen: In function 'icache_Vector_Multiple_High_Round_and_Add_Signed_Half_Word_Saturate_VC3':
[all 2022-10-12 12:31:25] altivec.igen:1208:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
[all 2022-10-12 12:31:25]  1208 |           sat |= tempsat;
[all 2022-10-12 12:31:25]       |                ~~~~^~~~~~    
[all 2022-10-12 12:31:25] altivec.igen:1197:21: note: 'sat' was declared here
[all 2022-10-12 12:31:25]  1197 |         int i, sat, tempsat;
[all 2022-10-12 12:31:25]       |                     ^~~
[all 2022-10-12 12:31:26] altivec.igen: In function 'icache_Vector_Multiple_High_and_Add_Signed_Half_Word_Saturate_VC4':
[all 2022-10-12 12:31:26] altivec.igen:1191:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
[all 2022-10-12 12:31:26]  1191 |           sat |= tempsat;
[all 2022-10-12 12:31:26]       |                ~~~~^~~~~~    
[all 2022-10-12 12:31:26] altivec.igen:1181:21: note: 'sat' was declared here
[all 2022-10-12 12:31:26]  1181 |         int i, sat, tempsat;
[all 2022-10-12 12:31:26]       |                     ^~~
[all 2022-10-12 12:31:26] altivec.igen: In function 'icache_Vector_Multiple_High_Round_and_Add_Signed_Half_Word_Saturate_VC4':
[all 2022-10-12 12:31:26] altivec.igen:1208:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
[all 2022-10-12 12:31:26]  1208 |           sat |= tempsat;
[all 2022-10-12 12:31:26]       |                ~~~~^~~~~~    
[all 2022-10-12 12:31:26] altivec.igen:1197:21: note: 'sat' was declared here
[all 2022-10-12 12:31:26]  1197 |         int i, sat, tempsat;
[all 2022-10-12 12:31:26]       |                     ^~~
[all 2022-10-12 12:31:27] altivec.igen: In function 'icache_Vector_Multiple_High_and_Add_Signed_Half_Word_Saturate_VC5':
[all 2022-10-12 12:31:27] altivec.igen:1191:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
[all 2022-10-12 12:31:27]  1191 |           sat |= tempsat;
[all 2022-10-12 12:31:27]       |                ~~~~^~~~~~    
[all 2022-10-12 12:31:27] altivec.igen:1181:21: note: 'sat' was declared here
[all 2022-10-12 12:31:27]  1181 |         int i, sat, tempsat;
[all 2022-10-12 12:31:27]       |                     ^~~
[all 2022-10-12 12:31:27] altivec.igen: In function 'icache_Vector_Multiple_High_Round_and_Add_Signed_Half_Word_Saturate_VC5':
[all 2022-10-12 12:31:27] altivec.igen:1208:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
[all 2022-10-12 12:31:27]  1208 |           sat |= tempsat;
[all 2022-10-12 12:31:27]       |                ~~~~^~~~~~    
[all 2022-10-12 12:31:27] altivec.igen:1197:21: note: 'sat' was declared here
[all 2022-10-12 12:31:27]  1197 |         int i, sat, tempsat;
[all 2022-10-12 12:31:27]       |                     ^~~
[all 2022-10-12 12:31:29] altivec.igen: In function 'icache_Vector_Multiple_High_and_Add_Signed_Half_Word_Saturate_VC6':
[all 2022-10-12 12:31:29] altivec.igen:1191:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
[all 2022-10-12 12:31:29]  1191 |           sat |= tempsat;
[all 2022-10-12 12:31:29]       |                ~~~~^~~~~~    
[all 2022-10-12 12:31:29] altivec.igen:1181:21: note: 'sat' was declared here
[all 2022-10-12 12:31:29]  1181 |         int i, sat, tempsat;
[all 2022-10-12 12:31:29]       |                     ^~~
[all 2022-10-12 12:31:29] altivec.igen: In function 'icache_Vector_Multiple_High_Round_and_Add_Signed_Half_Word_Saturate_VC6':
[all 2022-10-12 12:31:29] altivec.igen:1208:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
[all 2022-10-12 12:31:29]  1208 |           sat |= tempsat;
[all 2022-10-12 12:31:29]       |                ~~~~^~~~~~    
[all 2022-10-12 12:31:29] altivec.igen:1197:21: note: 'sat' was declared here
[all 2022-10-12 12:31:29]  1197 |         int i, sat, tempsat;
[all 2022-10-12 12:31:29]       |                     ^~~
[all 2022-10-12 12:31:30] altivec.igen: In function 'icache_Vector_Multiple_High_and_Add_Signed_Half_Word_Saturate_VC7':
[all 2022-10-12 12:31:30] altivec.igen:1191:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
[all 2022-10-12 12:31:30]  1191 |           sat |= tempsat;
[all 2022-10-12 12:31:30]       |                ~~~~^~~~~~    
[all 2022-10-12 12:31:30] altivec.igen:1181:21: note: 'sat' was declared here
[all 2022-10-12 12:31:30]  1181 |         int i, sat, tempsat;
[all 2022-10-12 12:31:30]       |                     ^~~
[all 2022-10-12 12:31:30] altivec.igen: In function 'icache_Vector_Multiple_High_Round_and_Add_Signed_Half_Word_Saturate_VC7':
[all 2022-10-12 12:31:30] altivec.igen:1208:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
[all 2022-10-12 12:31:30]  1208 |           sat |= tempsat;
[all 2022-10-12 12:31:30]       |                ~~~~^~~~~~    
[all 2022-10-12 12:31:30] altivec.igen:1197:21: note: 'sat' was declared here
[all 2022-10-12 12:31:30]  1197 |         int i, sat, tempsat;
[all 2022-10-12 12:31:30]       |                     ^~~
[all 2022-10-12 12:31:31] altivec.igen: In function 'icache_Vector_Multiple_High_and_Add_Signed_Half_Word_Saturate_VC8':
[all 2022-10-12 12:31:31] altivec.igen:1191:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
[all 2022-10-12 12:31:31]  1191 |           sat |= tempsat;
[all 2022-10-12 12:31:31]       |                ~~~~^~~~~~    
[all 2022-10-12 12:31:31] altivec.igen:1181:21: note: 'sat' was declared here
[all 2022-10-12 12:31:31]  1181 |         int i, sat, tempsat;
[all 2022-10-12 12:31:31]       |                     ^~~
[all 2022-10-12 12:31:31] altivec.igen: In function 'icache_Vector_Multiple_High_Round_and_Add_Signed_Half_Word_Saturate_VC8':
[all 2022-10-12 12:31:31] altivec.igen:1208:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
[all 2022-10-12 12:31:31]  1208 |           sat |= tempsat;
[all 2022-10-12 12:31:31]       |                ~~~~^~~~~~    
[all 2022-10-12 12:31:31] altivec.igen:1197:21: note: 'sat' was declared here
[all 2022-10-12 12:31:31]  1197 |         int i, sat, tempsat;
[all 2022-10-12 12:31:31]       |                     ^~~
[all 2022-10-12 12:31:32] altivec.igen: In function 'icache_Vector_Add_Unsigned_Half_Word_Saturate':
[all 2022-10-12 12:31:32] altivec.igen:662:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
[all 2022-10-12 12:31:32]   662 |           sat |= tempsat;
[all 2022-10-12 12:31:32]       |                ~~~~^~~~~~    
[all 2022-10-12 12:31:32] altivec.igen:657:21: note: 'sat' was declared here
[all 2022-10-12 12:31:32]   657 |         int i, sat, tempsat;
[all 2022-10-12 12:31:32]       |                     ^~~
[all 2022-10-12 12:31:33] altivec.igen: In function 'icache_Vector_Multiple_High_and_Add_Signed_Half_Word_Saturate_VC9':
[all 2022-10-12 12:31:33] altivec.igen:1191:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
[all 2022-10-12 12:31:33]  1191 |           sat |= tempsat;
[all 2022-10-12 12:31:33]       |                ~~~~^~~~~~    
[all 2022-10-12 12:31:33] altivec.igen:1181:21: note: 'sat' was declared here
[all 2022-10-12 12:31:33]  1181 |         int i, sat, tempsat;
[all 2022-10-12 12:31:33]       |                     ^~~
[all 2022-10-12 12:31:33] altivec.igen: In function 'icache_Vector_Multiple_High_Round_and_Add_Signed_Half_Word_Saturate_VC9':
[all 2022-10-12 12:31:33] altivec.igen:1208:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
[all 2022-10-12 12:31:33]  1208 |           sat |= tempsat;
[all 2022-10-12 12:31:33]       |                ~~~~^~~~~~    
[all 2022-10-12 12:31:33] altivec.igen:1197:21: note: 'sat' was declared here
[all 2022-10-12 12:31:33]  1197 |         int i, sat, tempsat;
[all 2022-10-12 12:31:33]       |                     ^~~
[all 2022-10-12 12:31:33] altivec.igen: In function 'icache_Vector_Add_Unsigned_Word_Saturate':
[all 2022-10-12 12:31:33] altivec.igen:679:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
[all 2022-10-12 12:31:33]   679 |           sat |= tempsat;
[all 2022-10-12 12:31:33]       |                ~~~~^~~~~~    
[all 2022-10-12 12:31:33] altivec.igen:674:21: note: 'sat' was declared here
[all 2022-10-12 12:31:33]   674 |         int i, sat, tempsat;
[all 2022-10-12 12:31:33]       |                     ^~~
[all 2022-10-12 12:31:34] altivec.igen: In function 'icache_Vector_Multiple_High_and_Add_Signed_Half_Word_Saturate_VC10':
[all 2022-10-12 12:31:34] altivec.igen:1191:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
[all 2022-10-12 12:31:34]  1191 |           sat |= tempsat;
[all 2022-10-12 12:31:34]       |                ~~~~^~~~~~    
[all 2022-10-12 12:31:34] altivec.igen:1181:21: note: 'sat' was declared here
[all 2022-10-12 12:31:34]  1181 |         int i, sat, tempsat;
[all 2022-10-12 12:31:34]       |                     ^~~
[all 2022-10-12 12:31:34] altivec.igen: In function 'icache_Vector_Multiple_High_Round_and_Add_Signed_Half_Word_Saturate_VC10':
[all 2022-10-12 12:31:34] altivec.igen:1208:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
[all 2022-10-12 12:31:34]  1208 |           sat |= tempsat;
[all 2022-10-12 12:31:34]       |                ~~~~^~~~~~    
[all 2022-10-12 12:31:34] altivec.igen:1197:21: note: 'sat' was declared here
[all 2022-10-12 12:31:34]  1197 |         int i, sat, tempsat;
[all 2022-10-12 12:31:34]       |                     ^~~
[all 2022-10-12 12:31:35] altivec.igen: In function 'icache_Vector_Multiple_High_and_Add_Signed_Half_Word_Saturate_VC11':
[all 2022-10-12 12:31:35] altivec.igen:1191:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
[all 2022-10-12 12:31:35]  1191 |           sat |= tempsat;
[all 2022-10-12 12:31:35]       |                ~~~~^~~~~~    
[all 2022-10-12 12:31:35] altivec.igen:1181:21: note: 'sat' was declared here
[all 2022-10-12 12:31:35]  1181 |         int i, sat, tempsat;
[all 2022-10-12 12:31:35]       |                     ^~~
[all 2022-10-12 12:31:35] altivec.igen: In function 'icache_Vector_Multiple_High_Round_and_Add_Signed_Half_Word_Saturate_VC11':
[all 2022-10-12 12:31:35] altivec.igen:1208:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
[all 2022-10-12 12:31:35]  1208 |           sat |= tempsat;
[all 2022-10-12 12:31:35]       |                ~~~~^~~~~~    
[all 2022-10-12 12:31:35] altivec.igen:1197:21: note: 'sat' was declared here
[all 2022-10-12 12:31:35]  1197 |         int i, sat, tempsat;
[all 2022-10-12 12:31:35]       |                     ^~~
[all 2022-10-12 12:31:36] altivec.igen: In function 'icache_Vector_Add_Signed_Byte_Saturate':
[all 2022-10-12 12:31:36] altivec.igen:603:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
[all 2022-10-12 12:31:36]   603 |           sat |= tempsat;
[all 2022-10-12 12:31:36]       |                ~~~~^~~~~~    
[all 2022-10-12 12:31:36] altivec.igen:598:21: note: 'sat' was declared here
[all 2022-10-12 12:31:36]   598 |         int i, sat, tempsat;
[all 2022-10-12 12:31:36]       |                     ^~~
[all 2022-10-12 12:31:36] altivec.igen: In function 'icache_Vector_Multiple_High_and_Add_Signed_Half_Word_Saturate_VC12':
[all 2022-10-12 12:31:36] altivec.igen:1191:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
[all 2022-10-12 12:31:36]  1191 |           sat |= tempsat;
[all 2022-10-12 12:31:36]       |                ~~~~^~~~~~    
[all 2022-10-12 12:31:36] altivec.igen:1181:21: note: 'sat' was declared here
[all 2022-10-12 12:31:36]  1181 |         int i, sat, tempsat;
[all 2022-10-12 12:31:36]       |                     ^~~
[all 2022-10-12 12:31:36] altivec.igen: In function 'icache_Vector_Multiple_High_Round_and_Add_Signed_Half_Word_Saturate_VC12':
[all 2022-10-12 12:31:36] altivec.igen:1208:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
[all 2022-10-12 12:31:36]  1208 |           sat |= tempsat;
[all 2022-10-12 12:31:36]       |                ~~~~^~~~~~    
[all 2022-10-12 12:31:36] altivec.igen:1197:21: note: 'sat' was declared here
[all 2022-10-12 12:31:36]  1197 |         int i, sat, tempsat;
[all 2022-10-12 12:31:36]       |                     ^~~
[all 2022-10-12 12:31:37] altivec.igen: In function 'icache_Vector_Add_Signed_Half_Word_Saturate':
[all 2022-10-12 12:31:37] altivec.igen:616:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
[all 2022-10-12 12:31:37]   616 |           sat |= tempsat;
[all 2022-10-12 12:31:37]       |                ~~~~^~~~~~    
[all 2022-10-12 12:31:37] altivec.igen:609:21: note: 'sat' was declared here
[all 2022-10-12 12:31:37]   609 |         int i, sat, tempsat;
[all 2022-10-12 12:31:37]       |                     ^~~
[all 2022-10-12 12:31:38] altivec.igen: In function 'icache_Vector_Multiple_High_and_Add_Signed_Half_Word_Saturate_VC13':
[all 2022-10-12 12:31:38] altivec.igen:1191:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
[all 2022-10-12 12:31:38]  1191 |           sat |= tempsat;
[all 2022-10-12 12:31:38]       |                ~~~~^~~~~~    
[all 2022-10-12 12:31:38] altivec.igen:1181:21: note: 'sat' was declared here
[all 2022-10-12 12:31:38]  1181 |         int i, sat, tempsat;
[all 2022-10-12 12:31:38]       |                     ^~~
[all 2022-10-12 12:31:38] altivec.igen: In function 'icache_Vector_Multiple_High_Round_and_Add_Signed_Half_Word_Saturate_VC13':
[all 2022-10-12 12:31:38] altivec.igen:1208:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
[all 2022-10-12 12:31:38]  1208 |           sat |= tempsat;
[all 2022-10-12 12:31:38]       |                ~~~~^~~~~~    
[all 2022-10-12 12:31:38] altivec.igen:1197:21: note: 'sat' was declared here
[all 2022-10-12 12:31:38]  1197 |         int i, sat, tempsat;
[all 2022-10-12 12:31:38]       |                     ^~~
[all 2022-10-12 12:31:39] altivec.igen: In function 'icache_Vector_Add_Signed_Word_Saturate':
[all 2022-10-12 12:31:39] altivec.igen:627:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
[all 2022-10-12 12:31:39]   627 |           sat |= tempsat;
[all 2022-10-12 12:31:39]       |                ~~~~^~~~~~    
[all 2022-10-12 12:31:39] altivec.igen:622:21: note: 'sat' was declared here
[all 2022-10-12 12:31:39]   622 |         int i, sat, tempsat;
[all 2022-10-12 12:31:39]       |                     ^~~
[all 2022-10-12 12:31:39] altivec.igen: In function 'icache_Vector_Multiple_High_and_Add_Signed_Half_Word_Saturate_VC14':
[all 2022-10-12 12:31:39] altivec.igen:1191:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
[all 2022-10-12 12:31:39]  1191 |           sat |= tempsat;
[all 2022-10-12 12:31:39]       |                ~~~~^~~~~~    
[all 2022-10-12 12:31:39] altivec.igen:1181:21: note: 'sat' was declared here
[all 2022-10-12 12:31:39]  1181 |         int i, sat, tempsat;
[all 2022-10-12 12:31:39]       |                     ^~~
[all 2022-10-12 12:31:39] altivec.igen: In function 'icache_Vector_Multiple_High_Round_and_Add_Signed_Half_Word_Saturate_VC14':
[all 2022-10-12 12:31:39] altivec.igen:1208:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
[all 2022-10-12 12:31:39]  1208 |           sat |= tempsat;
[all 2022-10-12 12:31:39]       |                ~~~~^~~~~~    
[all 2022-10-12 12:31:39] altivec.igen:1197:21: note: 'sat' was declared here
[all 2022-10-12 12:31:39]  1197 |         int i, sat, tempsat;
[all 2022-10-12 12:31:39]       |                     ^~~
[all 2022-10-12 12:31:40] altivec.igen: In function 'icache_Vector_Multiple_High_and_Add_Signed_Half_Word_Saturate_VC15':
[all 2022-10-12 12:31:40] altivec.igen:1191:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
[all 2022-10-12 12:31:40]  1191 |           sat |= tempsat;
[all 2022-10-12 12:31:40]       |                ~~~~^~~~~~    
[all 2022-10-12 12:31:40] altivec.igen:1181:21: note: 'sat' was declared here
[all 2022-10-12 12:31:40]  1181 |         int i, sat, tempsat;
[all 2022-10-12 12:31:40]       |                     ^~~
[all 2022-10-12 12:31:40] altivec.igen: In function 'icache_Vector_Multiple_High_Round_and_Add_Signed_Half_Word_Saturate_VC15':
[all 2022-10-12 12:31:40] altivec.igen:1208:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
[all 2022-10-12 12:31:40]  1208 |           sat |= tempsat;
[all 2022-10-12 12:31:40]       |                ~~~~^~~~~~    
[all 2022-10-12 12:31:40] altivec.igen:1197:21: note: 'sat' was declared here
[all 2022-10-12 12:31:40]  1197 |         int i, sat, tempsat;
[all 2022-10-12 12:31:40]       |                     ^~~
[all 2022-10-12 12:31:42] altivec.igen: In function 'icache_Vector_Multiple_High_and_Add_Signed_Half_Word_Saturate_VC16':
[all 2022-10-12 12:31:42] altivec.igen:1191:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
[all 2022-10-12 12:31:42]  1191 |           sat |= tempsat;
[all 2022-10-12 12:31:42]       |                ~~~~^~~~~~    
[all 2022-10-12 12:31:42] altivec.igen:1181:21: note: 'sat' was declared here
[all 2022-10-12 12:31:42]  1181 |         int i, sat, tempsat;
[all 2022-10-12 12:31:42]       |                     ^~~
[all 2022-10-12 12:31:42] altivec.igen: In function 'icache_Vector_Multiple_High_Round_and_Add_Signed_Half_Word_Saturate_VC16':
[all 2022-10-12 12:31:42] altivec.igen:1208:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
[all 2022-10-12 12:31:42]  1208 |           sat |= tempsat;
[all 2022-10-12 12:31:42]       |                ~~~~^~~~~~    
[all 2022-10-12 12:31:42] altivec.igen:1197:21: note: 'sat' was declared here
[all 2022-10-12 12:31:42]  1197 |         int i, sat, tempsat;
[all 2022-10-12 12:31:42]       |                     ^~~
[all 2022-10-12 12:31:43] altivec.igen: In function 'icache_Vector_Multiple_High_and_Add_Signed_Half_Word_Saturate_VC17':
[all 2022-10-12 12:31:43] altivec.igen:1191:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
[all 2022-10-12 12:31:43]  1191 |           sat |= tempsat;
[all 2022-10-12 12:31:43]       |                ~~~~^~~~~~    
[all 2022-10-12 12:31:43] altivec.igen:1181:21: note: 'sat' was declared here
[all 2022-10-12 12:31:43]  1181 |         int i, sat, tempsat;
[all 2022-10-12 12:31:43]       |                     ^~~
[all 2022-10-12 12:31:43] altivec.igen: In function 'icache_Vector_Multiple_High_Round_and_Add_Signed_Half_Word_Saturate_VC17':
[all 2022-10-12 12:31:43] altivec.igen:1208:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
[all 2022-10-12 12:31:43]  1208 |           sat |= tempsat;
[all 2022-10-12 12:31:43]       |                ~~~~^~~~~~    
[all 2022-10-12 12:31:43] altivec.igen:1197:21: note: 'sat' was declared here
[all 2022-10-12 12:31:43]  1197 |         int i, sat, tempsat;
[all 2022-10-12 12:31:43]       |                     ^~~
[all 2022-10-12 12:31:44] altivec.igen: In function 'icache_Vector_Multiple_High_and_Add_Signed_Half_Word_Saturate_VC18':
[all 2022-10-12 12:31:44] altivec.igen:1191:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
[all 2022-10-12 12:31:44]  1191 |           sat |= tempsat;
[all 2022-10-12 12:31:44]       |                ~~~~^~~~~~    
[all 2022-10-12 12:31:44] altivec.igen:1181:21: note: 'sat' was declared here
[all 2022-10-12 12:31:44]  1181 |         int i, sat, tempsat;
[all 2022-10-12 12:31:44]       |                     ^~~
[all 2022-10-12 12:31:44] altivec.igen: In function 'icache_Vector_Multiple_High_Round_and_Add_Signed_Half_Word_Saturate_VC18':
[all 2022-10-12 12:31:44] altivec.igen:1208:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
[all 2022-10-12 12:31:44]  1208 |           sat |= tempsat;
[all 2022-10-12 12:31:44]       |                ~~~~^~~~~~    
[all 2022-10-12 12:31:44] altivec.igen:1197:21: note: 'sat' was declared here
[all 2022-10-12 12:31:44]  1197 |         int i, sat, tempsat;
[all 2022-10-12 12:31:44]       |                     ^~~
[all 2022-10-12 12:31:45] altivec.igen: In function 'icache_Vector_Multiple_High_and_Add_Signed_Half_Word_Saturate_VC19':
[all 2022-10-12 12:31:45] altivec.igen:1191:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
[all 2022-10-12 12:31:45]  1191 |           sat |= tempsat;
[all 2022-10-12 12:31:45]       |                ~~~~^~~~~~    
[all 2022-10-12 12:31:45] altivec.igen:1181:21: note: 'sat' was declared here
[all 2022-10-12 12:31:45]  1181 |         int i, sat, tempsat;
[all 2022-10-12 12:31:45]       |                     ^~~
[all 2022-10-12 12:31:45] altivec.igen: In function 'icache_Vector_Multiple_High_Round_and_Add_Signed_Half_Word_Saturate_VC19':
[all 2022-10-12 12:31:45] altivec.igen:1208:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
[all 2022-10-12 12:31:45]  1208 |           sat |= tempsat;
[all 2022-10-12 12:31:45]       |                ~~~~^~~~~~    
[all 2022-10-12 12:31:45] altivec.igen:1197:21: note: 'sat' was declared here
[all 2022-10-12 12:31:45]  1197 |         int i, sat, tempsat;
[all 2022-10-12 12:31:45]       |                     ^~~
[all 2022-10-12 12:31:46] altivec.igen: In function 'icache_Vector_Multiple_High_and_Add_Signed_Half_Word_Saturate_VC20':
[all 2022-10-12 12:31:46] altivec.igen:1191:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
[all 2022-10-12 12:31:46]  1191 |           sat |= tempsat;
[all 2022-10-12 12:31:46]       |                ~~~~^~~~~~    
[all 2022-10-12 12:31:46] altivec.igen:1181:21: note: 'sat' was declared here
[all 2022-10-12 12:31:46]  1181 |         int i, sat, tempsat;
[all 2022-10-12 12:31:46]       |                     ^~~
[all 2022-10-12 12:31:46] altivec.igen: In function 'icache_Vector_Multiple_High_Round_and_Add_Signed_Half_Word_Saturate_VC20':
[all 2022-10-12 12:31:46] altivec.igen:1208:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
[all 2022-10-12 12:31:46]  1208 |           sat |= tempsat;
[all 2022-10-12 12:31:46]       |                ~~~~^~~~~~    
[all 2022-10-12 12:31:46] altivec.igen:1197:21: note: 'sat' was declared here
[all 2022-10-12 12:31:46]  1197 |         int i, sat, tempsat;
[all 2022-10-12 12:31:46]       |                     ^~~
[all 2022-10-12 12:31:47] altivec.igen: In function 'icache_Vector_Multiple_High_and_Add_Signed_Half_Word_Saturate_VC21':
[all 2022-10-12 12:31:47] altivec.igen:1191:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
[all 2022-10-12 12:31:47]  1191 |           sat |= tempsat;
[all 2022-10-12 12:31:47]       |                ~~~~^~~~~~    
[all 2022-10-12 12:31:47] altivec.igen:1181:21: note: 'sat' was declared here
[all 2022-10-12 12:31:47]  1181 |         int i, sat, tempsat;
[all 2022-10-12 12:31:47]       |                     ^~~
[all 2022-10-12 12:31:47] altivec.igen: In function 'icache_Vector_Multiple_High_Round_and_Add_Signed_Half_Word_Saturate_VC21':
[all 2022-10-12 12:31:47] altivec.igen:1208:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
[all 2022-10-12 12:31:47]  1208 |           sat |= tempsat;
[all 2022-10-12 12:31:47]       |                ~~~~^~~~~~    
[all 2022-10-12 12:31:47] altivec.igen:1197:21: note: 'sat' was declared here
[all 2022-10-12 12:31:47]  1197 |         int i, sat, tempsat;
[all 2022-10-12 12:31:47]       |                     ^~~
[all 2022-10-12 12:31:48] altivec.igen: In function 'icache_Vector_Multiple_High_and_Add_Signed_Half_Word_Saturate_VC22':
[all 2022-10-12 12:31:48] altivec.igen:1191:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
[all 2022-10-12 12:31:48]  1191 |           sat |= tempsat;
[all 2022-10-12 12:31:48]       |                ~~~~^~~~~~    
[all 2022-10-12 12:31:48] altivec.igen:1181:21: note: 'sat' was declared here
[all 2022-10-12 12:31:48]  1181 |         int i, sat, tempsat;
[all 2022-10-12 12:31:48]       |                     ^~~
[all 2022-10-12 12:31:48] altivec.igen: In function 'icache_Vector_Multiple_High_Round_and_Add_Signed_Half_Word_Saturate_VC22':
[all 2022-10-12 12:31:48] altivec.igen:1208:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
[all 2022-10-12 12:31:48]  1208 |           sat |= tempsat;
[all 2022-10-12 12:31:48]       |                ~~~~^~~~~~    
[all 2022-10-12 12:31:48] altivec.igen:1197:21: note: 'sat' was declared here
[all 2022-10-12 12:31:48]  1197 |         int i, sat, tempsat;
[all 2022-10-12 12:31:48]       |                     ^~~
[all 2022-10-12 12:31:49] altivec.igen: In function 'icache_Vector_Multiple_High_and_Add_Signed_Half_Word_Saturate_VC23':
[all 2022-10-12 12:31:49] altivec.igen:1191:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
[all 2022-10-12 12:31:49]  1191 |           sat |= tempsat;
[all 2022-10-12 12:31:49]       |                ~~~~^~~~~~    
[all 2022-10-12 12:31:49] altivec.igen:1181:21: note: 'sat' was declared here
[all 2022-10-12 12:31:49]  1181 |         int i, sat, tempsat;
[all 2022-10-12 12:31:49]       |                     ^~~
[all 2022-10-12 12:31:49] altivec.igen: In function 'icache_Vector_Multiple_High_Round_and_Add_Signed_Half_Word_Saturate_VC23':
[all 2022-10-12 12:31:49] altivec.igen:1208:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
[all 2022-10-12 12:31:49]  1208 |           sat |= tempsat;
[all 2022-10-12 12:31:49]       |                ~~~~^~~~~~    
[all 2022-10-12 12:31:49] altivec.igen:1197:21: note: 'sat' was declared here
[all 2022-10-12 12:31:49]  1197 |         int i, sat, tempsat;
[all 2022-10-12 12:31:49]       |                     ^~~
[all 2022-10-12 12:31:50] altivec.igen: In function 'icache_Vector_Sum_Across_Partial_14_Unsigned_Byte_Saturate':
[all 2022-10-12 12:31:50] altivec.igen:2303:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
[all 2022-10-12 12:31:50]  2303 |           sat |= tempsat;
[all 2022-10-12 12:31:50]       |                ~~~~^~~~~~    
[all 2022-10-12 12:31:50] altivec.igen:2294:24: note: 'sat' was declared here
[all 2022-10-12 12:31:50]  2294 |         int i, j, sat, tempsat;
[all 2022-10-12 12:31:50]       |                        ^~~
[all 2022-10-12 12:31:50] altivec.igen: In function 'icache_Vector_Multiple_High_and_Add_Signed_Half_Word_Saturate_VC24':
[all 2022-10-12 12:31:50] altivec.igen:1191:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
[all 2022-10-12 12:31:50]  1191 |           sat |= tempsat;
[all 2022-10-12 12:31:50]       |                ~~~~^~~~~~    
[all 2022-10-12 12:31:50] altivec.igen:1181:21: note: 'sat' was declared here
[all 2022-10-12 12:31:50]  1181 |         int i, sat, tempsat;
[all 2022-10-12 12:31:50]       |                     ^~~
[all 2022-10-12 12:31:50] altivec.igen: In function 'icache_Vector_Multiple_High_Round_and_Add_Signed_Half_Word_Saturate_VC24':
[all 2022-10-12 12:31:50] altivec.igen:1208:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
[all 2022-10-12 12:31:50]  1208 |           sat |= tempsat;
[all 2022-10-12 12:31:50]       |                ~~~~^~~~~~    
[all 2022-10-12 12:31:50] altivec.igen:1197:21: note: 'sat' was declared here
[all 2022-10-12 12:31:50]  1197 |         int i, sat, tempsat;
[all 2022-10-12 12:31:50]       |                     ^~~
[all 2022-10-12 12:31:51] altivec.igen: In function 'icache_Vector_Subtract_Unsigned_Half_Word_Saturate':
[all 2022-10-12 12:31:51] altivec.igen:2216:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
[all 2022-10-12 12:31:51]  2216 |           sat |= tempsat;
[all 2022-10-12 12:31:51]       |                ~~~~^~~~~~    
[all 2022-10-12 12:31:51] altivec.igen:2211:21: note: 'sat' was declared here
[all 2022-10-12 12:31:51]  2211 |         int i, sat, tempsat;
[all 2022-10-12 12:31:51]       |                     ^~~
[all 2022-10-12 12:31:51] altivec.igen: In function 'icache_Vector_Sum_Across_Partial_14_Signed_Half_Word_Saturate':
[all 2022-10-12 12:31:51] altivec.igen:2288:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
[all 2022-10-12 12:31:51]  2288 |           sat |= tempsat;
[all 2022-10-12 12:31:51]       |                ~~~~^~~~~~    
[all 2022-10-12 12:31:51] altivec.igen:2281:24: note: 'sat' was declared here
[all 2022-10-12 12:31:51]  2281 |         int i, j, sat, tempsat;
[all 2022-10-12 12:31:51]       |                        ^~~
[all 2022-10-12 12:31:52] altivec.igen: In function 'icache_Vector_Multiple_High_and_Add_Signed_Half_Word_Saturate_VC25':
[all 2022-10-12 12:31:52] altivec.igen:1191:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
[all 2022-10-12 12:31:52]  1191 |           sat |= tempsat;
[all 2022-10-12 12:31:52]       |                ~~~~^~~~~~    
[all 2022-10-12 12:31:52] altivec.igen:1181:21: note: 'sat' was declared here
[all 2022-10-12 12:31:52]  1181 |         int i, sat, tempsat;
[all 2022-10-12 12:31:52]       |                     ^~~
[all 2022-10-12 12:31:52] altivec.igen: In function 'icache_Vector_Multiple_High_Round_and_Add_Signed_Half_Word_Saturate_VC25':
[all 2022-10-12 12:31:52] altivec.igen:1208:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
[all 2022-10-12 12:31:52]  1208 |           sat |= tempsat;
[all 2022-10-12 12:31:52]       |                ~~~~^~~~~~    
[all 2022-10-12 12:31:52] altivec.igen:1197:21: note: 'sat' was declared here
[all 2022-10-12 12:31:52]  1197 |         int i, sat, tempsat;
[all 2022-10-12 12:31:52]       |                     ^~~
[all 2022-10-12 12:31:53] altivec.igen: In function 'icache_Vector_Subtract_Unsigned_Word_Saturate':
[all 2022-10-12 12:31:53] altivec.igen:2233:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
[all 2022-10-12 12:31:53]  2233 |           sat |= tempsat;
[all 2022-10-12 12:31:53]       |                ~~~~^~~~~~    
[all 2022-10-12 12:31:53] altivec.igen:2228:21: note: 'sat' was declared here
[all 2022-10-12 12:31:53]  2228 |         int i, sat, tempsat;
[all 2022-10-12 12:31:53]       |                     ^~~
[all 2022-10-12 12:31:53] altivec.igen: In function 'icache_Vector_Sum_Across_Partial_12_Signed_Word_Saturate':
[all 2022-10-12 12:31:53] altivec.igen:2261:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
[all 2022-10-12 12:31:53]  2261 |           sat |= tempsat;
[all 2022-10-12 12:31:53]       |                ~~~~^~~~~~    
[all 2022-10-12 12:31:53] altivec.igen:2255:24: note: 'sat' was declared here
[all 2022-10-12 12:31:53]  2255 |         int i, j, sat, tempsat;
[all 2022-10-12 12:31:53]       |                        ^~~
[all 2022-10-12 12:31:53] altivec.igen: In function 'icache_Vector_Multiple_High_and_Add_Signed_Half_Word_Saturate_VC26':
[all 2022-10-12 12:31:53] altivec.igen:1191:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
[all 2022-10-12 12:31:53]  1191 |           sat |= tempsat;
[all 2022-10-12 12:31:53]       |                ~~~~^~~~~~    
[all 2022-10-12 12:31:53] altivec.igen:1181:21: note: 'sat' was declared here
[all 2022-10-12 12:31:53]  1181 |         int i, sat, tempsat;
[all 2022-10-12 12:31:53]       |                     ^~~
[all 2022-10-12 12:31:53] altivec.igen: In function 'icache_Vector_Multiple_High_Round_and_Add_Signed_Half_Word_Saturate_VC26':
[all 2022-10-12 12:31:53] altivec.igen:1208:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
[all 2022-10-12 12:31:53]  1208 |           sat |= tempsat;
[all 2022-10-12 12:31:53]       |                ~~~~^~~~~~    
[all 2022-10-12 12:31:53] altivec.igen:1197:21: note: 'sat' was declared here
[all 2022-10-12 12:31:53]  1197 |         int i, sat, tempsat;
[all 2022-10-12 12:31:53]       |                     ^~~
[all 2022-10-12 12:31:54] altivec.igen: In function 'icache_Vector_Multiple_High_and_Add_Signed_Half_Word_Saturate_VC27':
[all 2022-10-12 12:31:54] altivec.igen:1191:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
[all 2022-10-12 12:31:54]  1191 |           sat |= tempsat;
[all 2022-10-12 12:31:54]       |                ~~~~^~~~~~    
[all 2022-10-12 12:31:54] altivec.igen:1181:21: note: 'sat' was declared here
[all 2022-10-12 12:31:54]  1181 |         int i, sat, tempsat;
[all 2022-10-12 12:31:54]       |                     ^~~
[all 2022-10-12 12:31:54] altivec.igen: In function 'icache_Vector_Multiple_High_Round_and_Add_Signed_Half_Word_Saturate_VC27':
[all 2022-10-12 12:31:54] altivec.igen:1208:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
[all 2022-10-12 12:31:54]  1208 |           sat |= tempsat;
[all 2022-10-12 12:31:54]       |                ~~~~^~~~~~    
[all 2022-10-12 12:31:54] altivec.igen:1197:21: note: 'sat' was declared here
[all 2022-10-12 12:31:54]  1197 |         int i, sat, tempsat;
[all 2022-10-12 12:31:54]       |                     ^~~
[all 2022-10-12 12:31:55] altivec.igen: In function 'icache_Vector_Sum_Across_Partial_14_Signed_Byte_Saturate':
[all 2022-10-12 12:31:55] altivec.igen:2275:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
[all 2022-10-12 12:31:55]  2275 |           sat |= tempsat;
[all 2022-10-12 12:31:55]       |                ~~~~^~~~~~    
[all 2022-10-12 12:31:55] altivec.igen:2268:24: note: 'sat' was declared here
[all 2022-10-12 12:31:55]  2268 |         int i, j, sat, tempsat;
[all 2022-10-12 12:31:55]       |                        ^~~
[all 2022-10-12 12:31:55] altivec.igen: In function 'icache_Vector_Multiple_High_and_Add_Signed_Half_Word_Saturate_VC28':
[all 2022-10-12 12:31:55] altivec.igen:1191:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
[all 2022-10-12 12:31:55]  1191 |           sat |= tempsat;
[all 2022-10-12 12:31:55]       |                ~~~~^~~~~~    
[all 2022-10-12 12:31:55] altivec.igen:1181:21: note: 'sat' was declared here
[all 2022-10-12 12:31:55]  1181 |         int i, sat, tempsat;
[all 2022-10-12 12:31:55]       |                     ^~~
[all 2022-10-12 12:31:55] altivec.igen: In function 'icache_Vector_Multiple_High_Round_and_Add_Signed_Half_Word_Saturate_VC28':
[all 2022-10-12 12:31:55] altivec.igen:1208:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
[all 2022-10-12 12:31:55]  1208 |           sat |= tempsat;
[all 2022-10-12 12:31:55]       |                ~~~~^~~~~~    
[all 2022-10-12 12:31:55] altivec.igen:1197:21: note: 'sat' was declared here
[all 2022-10-12 12:31:55]  1197 |         int i, sat, tempsat;
[all 2022-10-12 12:31:55]       |                     ^~~
[all 2022-10-12 12:31:56] altivec.igen: In function 'icache_Vector_Multiple_High_and_Add_Signed_Half_Word_Saturate_VC29':
[all 2022-10-12 12:31:56] altivec.igen:1191:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
[all 2022-10-12 12:31:56]  1191 |           sat |= tempsat;
[all 2022-10-12 12:31:56]       |                ~~~~^~~~~~    
[all 2022-10-12 12:31:56] altivec.igen:1181:21: note: 'sat' was declared here
[all 2022-10-12 12:31:56]  1181 |         int i, sat, tempsat;
[all 2022-10-12 12:31:56]       |                     ^~~
[all 2022-10-12 12:31:56] altivec.igen: In function 'icache_Vector_Multiple_High_Round_and_Add_Signed_Half_Word_Saturate_VC29':
[all 2022-10-12 12:31:56] altivec.igen:1208:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
[all 2022-10-12 12:31:56]  1208 |           sat |= tempsat;
[all 2022-10-12 12:31:56]       |                ~~~~^~~~~~    
[all 2022-10-12 12:31:56] altivec.igen:1197:21: note: 'sat' was declared here
[all 2022-10-12 12:31:56]  1197 |         int i, sat, tempsat;
[all 2022-10-12 12:31:56]       |                     ^~~
[all 2022-10-12 12:31:57] altivec.igen: In function 'icache_Vector_Multiple_High_and_Add_Signed_Half_Word_Saturate_VC30':
[all 2022-10-12 12:31:57] altivec.igen:1191:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
[all 2022-10-12 12:31:57]  1191 |           sat |= tempsat;
[all 2022-10-12 12:31:57]       |                ~~~~^~~~~~    
[all 2022-10-12 12:31:57] altivec.igen:1181:21: note: 'sat' was declared here
[all 2022-10-12 12:31:57]  1181 |         int i, sat, tempsat;
[all 2022-10-12 12:31:57]       |                     ^~~
[all 2022-10-12 12:31:57] altivec.igen: In function 'icache_Vector_Multiple_High_Round_and_Add_Signed_Half_Word_Saturate_VC30':
[all 2022-10-12 12:31:57] altivec.igen:1208:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
[all 2022-10-12 12:31:57]  1208 |           sat |= tempsat;
[all 2022-10-12 12:31:57]       |                ~~~~^~~~~~    
[all 2022-10-12 12:31:57] altivec.igen:1197:21: note: 'sat' was declared here
[all 2022-10-12 12:31:57]  1197 |         int i, sat, tempsat;
[all 2022-10-12 12:31:57]       |                     ^~~
[all 2022-10-12 12:31:58] altivec.igen: In function 'icache_Vector_Multiple_High_and_Add_Signed_Half_Word_Saturate_VC31':
[all 2022-10-12 12:31:58] altivec.igen:1191:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
[all 2022-10-12 12:31:58]  1191 |           sat |= tempsat;
[all 2022-10-12 12:31:58]       |                ~~~~^~~~~~    
[all 2022-10-12 12:31:58] altivec.igen:1181:21: note: 'sat' was declared here
[all 2022-10-12 12:31:58]  1181 |         int i, sat, tempsat;
[all 2022-10-12 12:31:58]       |                     ^~~
[all 2022-10-12 12:31:58] altivec.igen: In function 'icache_Vector_Multiple_High_Round_and_Add_Signed_Half_Word_Saturate_VC31':
[all 2022-10-12 12:31:58] altivec.igen:1208:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
[all 2022-10-12 12:31:58]  1208 |           sat |= tempsat;
[all 2022-10-12 12:31:58]       |                ~~~~^~~~~~    
[all 2022-10-12 12:31:58] altivec.igen:1197:21: note: 'sat' was declared here
[all 2022-10-12 12:31:58]  1197 |         int i, sat, tempsat;
[all 2022-10-12 12:31:58]       |                     ^~~
[all 2022-10-12 12:32:57] cc1: all warnings being treated as errors
[all 2022-10-12 12:32:57] make[3]: *** [Makefile:144: icache.o] Error 1
[all 2022-10-12 12:32:57] make[3]: Leaving directory '/var/lib/laminar/run/gdb-powerpc-eabialtivec/7/binutils-gdb/sim/ppc'
[all 2022-10-12 12:32:57] make[2]: *** [Makefile:1933: all-recursive] Error 1
[all 2022-10-12 12:32:57] make[2]: Leaving directory '/var/lib/laminar/run/gdb-powerpc-eabialtivec/7/binutils-gdb/sim'
[all 2022-10-12 12:32:57] make[1]: *** [Makefile:1185: all] Error 2
[all 2022-10-12 12:32:57] make[1]: Leaving directory '/var/lib/laminar/run/gdb-powerpc-eabialtivec/7/binutils-gdb/sim'
[all 2022-10-12 12:32:57] make: *** [Makefile:11309: all-sim] Error 2


Something for a ticket?

MfG, JBG

-- 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH v2 6/7] sim/ppc: Add ATTRIBUTE_PRINTF
  2022-10-12 12:50             ` Jan-Benedict Glaw
@ 2022-10-12 13:16               ` Tsukasa OI
  0 siblings, 0 replies; 32+ messages in thread
From: Tsukasa OI @ 2022-10-12 13:16 UTC (permalink / raw)
  To: Jan-Benedict Glaw, Andrew Burgess; +Cc: Frank Ch . Eigler, gdb-patches

I'm trying to compile Binutils + GDB with Clang with some configurations
(e.g. --enable-targets=all and --target=riscv64-unknown-elf) and my goal
for now is to build default all-arch Binutils ("--enable-targets=all")
with Clang 15.0.0 without "--disable-werror".

PowerPC is out of my scope (though there are some upcoming sim/ppc
patches) and I hope someone familiar with PPC will fix it.

Thanks,
Tsukasa

On 2022/10/12 21:50, Jan-Benedict Glaw wrote:
> On Wed, 2022-10-12 12:36:49 +0200, Jan-Benedict Glaw <jbglaw@lug-owl.de> wrote:
>> On Wed, 2022-10-12 10:39:25 +0100, Andrew Burgess <aburgess@redhat.com> wrote:
>>> Jan-Benedict Glaw <jbglaw@lug-owl.de> writes:
>>>> Building with a recent GCC, I get this:
>>>>
>>>> $ .../configure --prefix=/tmp/gdb-ppc-elf --target=ppc-elf
>>>> $ make V=1 all-gdb
>>>> [...]
> 
> ...while we're at ppc: Should powerpc64-linux_altivec,
> powerpc-eabisimaltivec and powerpc-eabialtivec be supported? I think
> so, but these all fail with:
> 
> + log_execute cfg ./configure --prefix=/tmp/gdb-powerpc-eabialtivec --target=powerpc-eabialtivec
> + log_execute all make V=1 all-gdb
> [...]
> [all 2022-10-12 12:30:53] /usr/lib/gcc-snapshot/bin/gcc -c -g -O2   -Werror -DDEFAULT_INLINE=0 -DWITH_SMP=5     -DWITH_ALTIVEC   -DHAVE_TERMIOS_STRUCTURE -DHAVE_TERMIOS_CLINE -DHAVE_DEVZERO -Wall -Wdeclaration-after-statement -Wpointer-arith -Wno-unused -Wunused-value -Wunused-function -Wno-switch -Wno-char-subscripts -Wempty-body -Wunused-but-set-parameter -Wno-error=maybe-uninitialized -Wmissing-declarations -Wmissing-prototypes -Wdeclaration-after-statement -Wmissing-parameter-type -Wpointer-sign -Wold-style-declaration -I. -I. -I./../../include -I../../bfd -I./../../bfd -I../../gdb -I./../../gdb  -I./../../gdb/config -I../.. -I./../../gnulib/import -I../../gnulib/import  -DHAVE_COMMON_FPU -I../common -I./../common icache.c
> [all 2022-10-12 12:30:54] altivec.igen: In function 'icache_Vector_Convert_to_Unsigned_FixedPoint_Word_Saturate':
> [all 2022-10-12 12:30:54] altivec.igen:1016:31: error: pointer targets in passing argument 1 of 'sim_fpu_to64u' differ in signedness [-Werror=pointer-sign]
> [all 2022-10-12 12:30:54]  1016 |           sim_fpu_to64u (&temp, &a, sim_fpu_round_default);
> [all 2022-10-12 12:30:54]       |                               ^~~~~
> [all 2022-10-12 12:30:54]       |                               |
> [all 2022-10-12 12:30:54]       |                               int64_t * {aka long int *}
> [all 2022-10-12 12:30:54] In file included from icache.c:33:
> [all 2022-10-12 12:30:54] ../common/sim-fpu.h:308:47: note: expected 'uint64_t *' {aka 'long unsigned int *'} but argument is of type 'int64_t *' {aka 'long int *'}
> [all 2022-10-12 12:30:54]   308 | INLINE_SIM_FPU (int) sim_fpu_to64u (uint64_t *u, const sim_fpu *f,
> [all 2022-10-12 12:30:54]       |                                     ~~~~~~~~~~^
> [all 2022-10-12 12:31:21] altivec.igen: In function 'icache_Vector_Multiple_High_and_Add_Signed_Half_Word_Saturate_VC0':
> [all 2022-10-12 12:31:21] altivec.igen:1191:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
> [all 2022-10-12 12:31:21]  1191 |           sat |= tempsat;
> [all 2022-10-12 12:31:21]       |                ~~~~^~~~~~    
> [all 2022-10-12 12:31:21] altivec.igen:1181:21: note: 'sat' was declared here
> [all 2022-10-12 12:31:21]  1181 |         int i, sat, tempsat;
> [all 2022-10-12 12:31:21]       |                     ^~~
> [all 2022-10-12 12:31:21] altivec.igen: In function 'icache_Vector_Multiple_High_Round_and_Add_Signed_Half_Word_Saturate_VC0':
> [all 2022-10-12 12:31:21] altivec.igen:1208:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
> [all 2022-10-12 12:31:21]  1208 |           sat |= tempsat;
> [all 2022-10-12 12:31:21]       |                ~~~~^~~~~~    
> [all 2022-10-12 12:31:21] altivec.igen:1197:21: note: 'sat' was declared here
> [all 2022-10-12 12:31:21]  1197 |         int i, sat, tempsat;
> [all 2022-10-12 12:31:21]       |                     ^~~
> [all 2022-10-12 12:31:22] altivec.igen: In function 'icache_Vector_Multiple_High_and_Add_Signed_Half_Word_Saturate_VC1':
> [all 2022-10-12 12:31:22] altivec.igen:1191:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
> [all 2022-10-12 12:31:22]  1191 |           sat |= tempsat;
> [all 2022-10-12 12:31:22]       |                ~~~~^~~~~~    
> [all 2022-10-12 12:31:22] altivec.igen:1181:21: note: 'sat' was declared here
> [all 2022-10-12 12:31:22]  1181 |         int i, sat, tempsat;
> [all 2022-10-12 12:31:22]       |                     ^~~
> [all 2022-10-12 12:31:22] altivec.igen: In function 'icache_Vector_Multiple_High_Round_and_Add_Signed_Half_Word_Saturate_VC1':
> [all 2022-10-12 12:31:22] altivec.igen:1208:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
> [all 2022-10-12 12:31:22]  1208 |           sat |= tempsat;
> [all 2022-10-12 12:31:22]       |                ~~~~^~~~~~    
> [all 2022-10-12 12:31:22] altivec.igen:1197:21: note: 'sat' was declared here
> [all 2022-10-12 12:31:22]  1197 |         int i, sat, tempsat;
> [all 2022-10-12 12:31:22]       |                     ^~~
> [all 2022-10-12 12:31:23] altivec.igen: In function 'icache_Vector_Multiple_High_and_Add_Signed_Half_Word_Saturate_VC2':
> [all 2022-10-12 12:31:23] altivec.igen:1191:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
> [all 2022-10-12 12:31:23]  1191 |           sat |= tempsat;
> [all 2022-10-12 12:31:23]       |                ~~~~^~~~~~    
> [all 2022-10-12 12:31:23] altivec.igen:1181:21: note: 'sat' was declared here
> [all 2022-10-12 12:31:23]  1181 |         int i, sat, tempsat;
> [all 2022-10-12 12:31:23]       |                     ^~~
> [all 2022-10-12 12:31:23] altivec.igen: In function 'icache_Vector_Multiple_High_Round_and_Add_Signed_Half_Word_Saturate_VC2':
> [all 2022-10-12 12:31:23] altivec.igen:1208:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
> [all 2022-10-12 12:31:23]  1208 |           sat |= tempsat;
> [all 2022-10-12 12:31:23]       |                ~~~~^~~~~~    
> [all 2022-10-12 12:31:23] altivec.igen:1197:21: note: 'sat' was declared here
> [all 2022-10-12 12:31:23]  1197 |         int i, sat, tempsat;
> [all 2022-10-12 12:31:23]       |                     ^~~
> [all 2022-10-12 12:31:24] altivec.igen: In function 'icache_Vector_Multiple_High_and_Add_Signed_Half_Word_Saturate_VC3':
> [all 2022-10-12 12:31:24] altivec.igen:1191:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
> [all 2022-10-12 12:31:24]  1191 |           sat |= tempsat;
> [all 2022-10-12 12:31:24]       |                ~~~~^~~~~~    
> [all 2022-10-12 12:31:24] altivec.igen:1181:21: note: 'sat' was declared here
> [all 2022-10-12 12:31:24]  1181 |         int i, sat, tempsat;
> [all 2022-10-12 12:31:24]       |                     ^~~
> [all 2022-10-12 12:31:25] altivec.igen: In function 'icache_Vector_Multiple_High_Round_and_Add_Signed_Half_Word_Saturate_VC3':
> [all 2022-10-12 12:31:25] altivec.igen:1208:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
> [all 2022-10-12 12:31:25]  1208 |           sat |= tempsat;
> [all 2022-10-12 12:31:25]       |                ~~~~^~~~~~    
> [all 2022-10-12 12:31:25] altivec.igen:1197:21: note: 'sat' was declared here
> [all 2022-10-12 12:31:25]  1197 |         int i, sat, tempsat;
> [all 2022-10-12 12:31:25]       |                     ^~~
> [all 2022-10-12 12:31:26] altivec.igen: In function 'icache_Vector_Multiple_High_and_Add_Signed_Half_Word_Saturate_VC4':
> [all 2022-10-12 12:31:26] altivec.igen:1191:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
> [all 2022-10-12 12:31:26]  1191 |           sat |= tempsat;
> [all 2022-10-12 12:31:26]       |                ~~~~^~~~~~    
> [all 2022-10-12 12:31:26] altivec.igen:1181:21: note: 'sat' was declared here
> [all 2022-10-12 12:31:26]  1181 |         int i, sat, tempsat;
> [all 2022-10-12 12:31:26]       |                     ^~~
> [all 2022-10-12 12:31:26] altivec.igen: In function 'icache_Vector_Multiple_High_Round_and_Add_Signed_Half_Word_Saturate_VC4':
> [all 2022-10-12 12:31:26] altivec.igen:1208:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
> [all 2022-10-12 12:31:26]  1208 |           sat |= tempsat;
> [all 2022-10-12 12:31:26]       |                ~~~~^~~~~~    
> [all 2022-10-12 12:31:26] altivec.igen:1197:21: note: 'sat' was declared here
> [all 2022-10-12 12:31:26]  1197 |         int i, sat, tempsat;
> [all 2022-10-12 12:31:26]       |                     ^~~
> [all 2022-10-12 12:31:27] altivec.igen: In function 'icache_Vector_Multiple_High_and_Add_Signed_Half_Word_Saturate_VC5':
> [all 2022-10-12 12:31:27] altivec.igen:1191:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
> [all 2022-10-12 12:31:27]  1191 |           sat |= tempsat;
> [all 2022-10-12 12:31:27]       |                ~~~~^~~~~~    
> [all 2022-10-12 12:31:27] altivec.igen:1181:21: note: 'sat' was declared here
> [all 2022-10-12 12:31:27]  1181 |         int i, sat, tempsat;
> [all 2022-10-12 12:31:27]       |                     ^~~
> [all 2022-10-12 12:31:27] altivec.igen: In function 'icache_Vector_Multiple_High_Round_and_Add_Signed_Half_Word_Saturate_VC5':
> [all 2022-10-12 12:31:27] altivec.igen:1208:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
> [all 2022-10-12 12:31:27]  1208 |           sat |= tempsat;
> [all 2022-10-12 12:31:27]       |                ~~~~^~~~~~    
> [all 2022-10-12 12:31:27] altivec.igen:1197:21: note: 'sat' was declared here
> [all 2022-10-12 12:31:27]  1197 |         int i, sat, tempsat;
> [all 2022-10-12 12:31:27]       |                     ^~~
> [all 2022-10-12 12:31:29] altivec.igen: In function 'icache_Vector_Multiple_High_and_Add_Signed_Half_Word_Saturate_VC6':
> [all 2022-10-12 12:31:29] altivec.igen:1191:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
> [all 2022-10-12 12:31:29]  1191 |           sat |= tempsat;
> [all 2022-10-12 12:31:29]       |                ~~~~^~~~~~    
> [all 2022-10-12 12:31:29] altivec.igen:1181:21: note: 'sat' was declared here
> [all 2022-10-12 12:31:29]  1181 |         int i, sat, tempsat;
> [all 2022-10-12 12:31:29]       |                     ^~~
> [all 2022-10-12 12:31:29] altivec.igen: In function 'icache_Vector_Multiple_High_Round_and_Add_Signed_Half_Word_Saturate_VC6':
> [all 2022-10-12 12:31:29] altivec.igen:1208:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
> [all 2022-10-12 12:31:29]  1208 |           sat |= tempsat;
> [all 2022-10-12 12:31:29]       |                ~~~~^~~~~~    
> [all 2022-10-12 12:31:29] altivec.igen:1197:21: note: 'sat' was declared here
> [all 2022-10-12 12:31:29]  1197 |         int i, sat, tempsat;
> [all 2022-10-12 12:31:29]       |                     ^~~
> [all 2022-10-12 12:31:30] altivec.igen: In function 'icache_Vector_Multiple_High_and_Add_Signed_Half_Word_Saturate_VC7':
> [all 2022-10-12 12:31:30] altivec.igen:1191:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
> [all 2022-10-12 12:31:30]  1191 |           sat |= tempsat;
> [all 2022-10-12 12:31:30]       |                ~~~~^~~~~~    
> [all 2022-10-12 12:31:30] altivec.igen:1181:21: note: 'sat' was declared here
> [all 2022-10-12 12:31:30]  1181 |         int i, sat, tempsat;
> [all 2022-10-12 12:31:30]       |                     ^~~
> [all 2022-10-12 12:31:30] altivec.igen: In function 'icache_Vector_Multiple_High_Round_and_Add_Signed_Half_Word_Saturate_VC7':
> [all 2022-10-12 12:31:30] altivec.igen:1208:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
> [all 2022-10-12 12:31:30]  1208 |           sat |= tempsat;
> [all 2022-10-12 12:31:30]       |                ~~~~^~~~~~    
> [all 2022-10-12 12:31:30] altivec.igen:1197:21: note: 'sat' was declared here
> [all 2022-10-12 12:31:30]  1197 |         int i, sat, tempsat;
> [all 2022-10-12 12:31:30]       |                     ^~~
> [all 2022-10-12 12:31:31] altivec.igen: In function 'icache_Vector_Multiple_High_and_Add_Signed_Half_Word_Saturate_VC8':
> [all 2022-10-12 12:31:31] altivec.igen:1191:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
> [all 2022-10-12 12:31:31]  1191 |           sat |= tempsat;
> [all 2022-10-12 12:31:31]       |                ~~~~^~~~~~    
> [all 2022-10-12 12:31:31] altivec.igen:1181:21: note: 'sat' was declared here
> [all 2022-10-12 12:31:31]  1181 |         int i, sat, tempsat;
> [all 2022-10-12 12:31:31]       |                     ^~~
> [all 2022-10-12 12:31:31] altivec.igen: In function 'icache_Vector_Multiple_High_Round_and_Add_Signed_Half_Word_Saturate_VC8':
> [all 2022-10-12 12:31:31] altivec.igen:1208:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
> [all 2022-10-12 12:31:31]  1208 |           sat |= tempsat;
> [all 2022-10-12 12:31:31]       |                ~~~~^~~~~~    
> [all 2022-10-12 12:31:31] altivec.igen:1197:21: note: 'sat' was declared here
> [all 2022-10-12 12:31:31]  1197 |         int i, sat, tempsat;
> [all 2022-10-12 12:31:31]       |                     ^~~
> [all 2022-10-12 12:31:32] altivec.igen: In function 'icache_Vector_Add_Unsigned_Half_Word_Saturate':
> [all 2022-10-12 12:31:32] altivec.igen:662:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
> [all 2022-10-12 12:31:32]   662 |           sat |= tempsat;
> [all 2022-10-12 12:31:32]       |                ~~~~^~~~~~    
> [all 2022-10-12 12:31:32] altivec.igen:657:21: note: 'sat' was declared here
> [all 2022-10-12 12:31:32]   657 |         int i, sat, tempsat;
> [all 2022-10-12 12:31:32]       |                     ^~~
> [all 2022-10-12 12:31:33] altivec.igen: In function 'icache_Vector_Multiple_High_and_Add_Signed_Half_Word_Saturate_VC9':
> [all 2022-10-12 12:31:33] altivec.igen:1191:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
> [all 2022-10-12 12:31:33]  1191 |           sat |= tempsat;
> [all 2022-10-12 12:31:33]       |                ~~~~^~~~~~    
> [all 2022-10-12 12:31:33] altivec.igen:1181:21: note: 'sat' was declared here
> [all 2022-10-12 12:31:33]  1181 |         int i, sat, tempsat;
> [all 2022-10-12 12:31:33]       |                     ^~~
> [all 2022-10-12 12:31:33] altivec.igen: In function 'icache_Vector_Multiple_High_Round_and_Add_Signed_Half_Word_Saturate_VC9':
> [all 2022-10-12 12:31:33] altivec.igen:1208:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
> [all 2022-10-12 12:31:33]  1208 |           sat |= tempsat;
> [all 2022-10-12 12:31:33]       |                ~~~~^~~~~~    
> [all 2022-10-12 12:31:33] altivec.igen:1197:21: note: 'sat' was declared here
> [all 2022-10-12 12:31:33]  1197 |         int i, sat, tempsat;
> [all 2022-10-12 12:31:33]       |                     ^~~
> [all 2022-10-12 12:31:33] altivec.igen: In function 'icache_Vector_Add_Unsigned_Word_Saturate':
> [all 2022-10-12 12:31:33] altivec.igen:679:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
> [all 2022-10-12 12:31:33]   679 |           sat |= tempsat;
> [all 2022-10-12 12:31:33]       |                ~~~~^~~~~~    
> [all 2022-10-12 12:31:33] altivec.igen:674:21: note: 'sat' was declared here
> [all 2022-10-12 12:31:33]   674 |         int i, sat, tempsat;
> [all 2022-10-12 12:31:33]       |                     ^~~
> [all 2022-10-12 12:31:34] altivec.igen: In function 'icache_Vector_Multiple_High_and_Add_Signed_Half_Word_Saturate_VC10':
> [all 2022-10-12 12:31:34] altivec.igen:1191:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
> [all 2022-10-12 12:31:34]  1191 |           sat |= tempsat;
> [all 2022-10-12 12:31:34]       |                ~~~~^~~~~~    
> [all 2022-10-12 12:31:34] altivec.igen:1181:21: note: 'sat' was declared here
> [all 2022-10-12 12:31:34]  1181 |         int i, sat, tempsat;
> [all 2022-10-12 12:31:34]       |                     ^~~
> [all 2022-10-12 12:31:34] altivec.igen: In function 'icache_Vector_Multiple_High_Round_and_Add_Signed_Half_Word_Saturate_VC10':
> [all 2022-10-12 12:31:34] altivec.igen:1208:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
> [all 2022-10-12 12:31:34]  1208 |           sat |= tempsat;
> [all 2022-10-12 12:31:34]       |                ~~~~^~~~~~    
> [all 2022-10-12 12:31:34] altivec.igen:1197:21: note: 'sat' was declared here
> [all 2022-10-12 12:31:34]  1197 |         int i, sat, tempsat;
> [all 2022-10-12 12:31:34]       |                     ^~~
> [all 2022-10-12 12:31:35] altivec.igen: In function 'icache_Vector_Multiple_High_and_Add_Signed_Half_Word_Saturate_VC11':
> [all 2022-10-12 12:31:35] altivec.igen:1191:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
> [all 2022-10-12 12:31:35]  1191 |           sat |= tempsat;
> [all 2022-10-12 12:31:35]       |                ~~~~^~~~~~    
> [all 2022-10-12 12:31:35] altivec.igen:1181:21: note: 'sat' was declared here
> [all 2022-10-12 12:31:35]  1181 |         int i, sat, tempsat;
> [all 2022-10-12 12:31:35]       |                     ^~~
> [all 2022-10-12 12:31:35] altivec.igen: In function 'icache_Vector_Multiple_High_Round_and_Add_Signed_Half_Word_Saturate_VC11':
> [all 2022-10-12 12:31:35] altivec.igen:1208:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
> [all 2022-10-12 12:31:35]  1208 |           sat |= tempsat;
> [all 2022-10-12 12:31:35]       |                ~~~~^~~~~~    
> [all 2022-10-12 12:31:35] altivec.igen:1197:21: note: 'sat' was declared here
> [all 2022-10-12 12:31:35]  1197 |         int i, sat, tempsat;
> [all 2022-10-12 12:31:35]       |                     ^~~
> [all 2022-10-12 12:31:36] altivec.igen: In function 'icache_Vector_Add_Signed_Byte_Saturate':
> [all 2022-10-12 12:31:36] altivec.igen:603:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
> [all 2022-10-12 12:31:36]   603 |           sat |= tempsat;
> [all 2022-10-12 12:31:36]       |                ~~~~^~~~~~    
> [all 2022-10-12 12:31:36] altivec.igen:598:21: note: 'sat' was declared here
> [all 2022-10-12 12:31:36]   598 |         int i, sat, tempsat;
> [all 2022-10-12 12:31:36]       |                     ^~~
> [all 2022-10-12 12:31:36] altivec.igen: In function 'icache_Vector_Multiple_High_and_Add_Signed_Half_Word_Saturate_VC12':
> [all 2022-10-12 12:31:36] altivec.igen:1191:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
> [all 2022-10-12 12:31:36]  1191 |           sat |= tempsat;
> [all 2022-10-12 12:31:36]       |                ~~~~^~~~~~    
> [all 2022-10-12 12:31:36] altivec.igen:1181:21: note: 'sat' was declared here
> [all 2022-10-12 12:31:36]  1181 |         int i, sat, tempsat;
> [all 2022-10-12 12:31:36]       |                     ^~~
> [all 2022-10-12 12:31:36] altivec.igen: In function 'icache_Vector_Multiple_High_Round_and_Add_Signed_Half_Word_Saturate_VC12':
> [all 2022-10-12 12:31:36] altivec.igen:1208:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
> [all 2022-10-12 12:31:36]  1208 |           sat |= tempsat;
> [all 2022-10-12 12:31:36]       |                ~~~~^~~~~~    
> [all 2022-10-12 12:31:36] altivec.igen:1197:21: note: 'sat' was declared here
> [all 2022-10-12 12:31:36]  1197 |         int i, sat, tempsat;
> [all 2022-10-12 12:31:36]       |                     ^~~
> [all 2022-10-12 12:31:37] altivec.igen: In function 'icache_Vector_Add_Signed_Half_Word_Saturate':
> [all 2022-10-12 12:31:37] altivec.igen:616:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
> [all 2022-10-12 12:31:37]   616 |           sat |= tempsat;
> [all 2022-10-12 12:31:37]       |                ~~~~^~~~~~    
> [all 2022-10-12 12:31:37] altivec.igen:609:21: note: 'sat' was declared here
> [all 2022-10-12 12:31:37]   609 |         int i, sat, tempsat;
> [all 2022-10-12 12:31:37]       |                     ^~~
> [all 2022-10-12 12:31:38] altivec.igen: In function 'icache_Vector_Multiple_High_and_Add_Signed_Half_Word_Saturate_VC13':
> [all 2022-10-12 12:31:38] altivec.igen:1191:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
> [all 2022-10-12 12:31:38]  1191 |           sat |= tempsat;
> [all 2022-10-12 12:31:38]       |                ~~~~^~~~~~    
> [all 2022-10-12 12:31:38] altivec.igen:1181:21: note: 'sat' was declared here
> [all 2022-10-12 12:31:38]  1181 |         int i, sat, tempsat;
> [all 2022-10-12 12:31:38]       |                     ^~~
> [all 2022-10-12 12:31:38] altivec.igen: In function 'icache_Vector_Multiple_High_Round_and_Add_Signed_Half_Word_Saturate_VC13':
> [all 2022-10-12 12:31:38] altivec.igen:1208:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
> [all 2022-10-12 12:31:38]  1208 |           sat |= tempsat;
> [all 2022-10-12 12:31:38]       |                ~~~~^~~~~~    
> [all 2022-10-12 12:31:38] altivec.igen:1197:21: note: 'sat' was declared here
> [all 2022-10-12 12:31:38]  1197 |         int i, sat, tempsat;
> [all 2022-10-12 12:31:38]       |                     ^~~
> [all 2022-10-12 12:31:39] altivec.igen: In function 'icache_Vector_Add_Signed_Word_Saturate':
> [all 2022-10-12 12:31:39] altivec.igen:627:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
> [all 2022-10-12 12:31:39]   627 |           sat |= tempsat;
> [all 2022-10-12 12:31:39]       |                ~~~~^~~~~~    
> [all 2022-10-12 12:31:39] altivec.igen:622:21: note: 'sat' was declared here
> [all 2022-10-12 12:31:39]   622 |         int i, sat, tempsat;
> [all 2022-10-12 12:31:39]       |                     ^~~
> [all 2022-10-12 12:31:39] altivec.igen: In function 'icache_Vector_Multiple_High_and_Add_Signed_Half_Word_Saturate_VC14':
> [all 2022-10-12 12:31:39] altivec.igen:1191:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
> [all 2022-10-12 12:31:39]  1191 |           sat |= tempsat;
> [all 2022-10-12 12:31:39]       |                ~~~~^~~~~~    
> [all 2022-10-12 12:31:39] altivec.igen:1181:21: note: 'sat' was declared here
> [all 2022-10-12 12:31:39]  1181 |         int i, sat, tempsat;
> [all 2022-10-12 12:31:39]       |                     ^~~
> [all 2022-10-12 12:31:39] altivec.igen: In function 'icache_Vector_Multiple_High_Round_and_Add_Signed_Half_Word_Saturate_VC14':
> [all 2022-10-12 12:31:39] altivec.igen:1208:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
> [all 2022-10-12 12:31:39]  1208 |           sat |= tempsat;
> [all 2022-10-12 12:31:39]       |                ~~~~^~~~~~    
> [all 2022-10-12 12:31:39] altivec.igen:1197:21: note: 'sat' was declared here
> [all 2022-10-12 12:31:39]  1197 |         int i, sat, tempsat;
> [all 2022-10-12 12:31:39]       |                     ^~~
> [all 2022-10-12 12:31:40] altivec.igen: In function 'icache_Vector_Multiple_High_and_Add_Signed_Half_Word_Saturate_VC15':
> [all 2022-10-12 12:31:40] altivec.igen:1191:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
> [all 2022-10-12 12:31:40]  1191 |           sat |= tempsat;
> [all 2022-10-12 12:31:40]       |                ~~~~^~~~~~    
> [all 2022-10-12 12:31:40] altivec.igen:1181:21: note: 'sat' was declared here
> [all 2022-10-12 12:31:40]  1181 |         int i, sat, tempsat;
> [all 2022-10-12 12:31:40]       |                     ^~~
> [all 2022-10-12 12:31:40] altivec.igen: In function 'icache_Vector_Multiple_High_Round_and_Add_Signed_Half_Word_Saturate_VC15':
> [all 2022-10-12 12:31:40] altivec.igen:1208:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
> [all 2022-10-12 12:31:40]  1208 |           sat |= tempsat;
> [all 2022-10-12 12:31:40]       |                ~~~~^~~~~~    
> [all 2022-10-12 12:31:40] altivec.igen:1197:21: note: 'sat' was declared here
> [all 2022-10-12 12:31:40]  1197 |         int i, sat, tempsat;
> [all 2022-10-12 12:31:40]       |                     ^~~
> [all 2022-10-12 12:31:42] altivec.igen: In function 'icache_Vector_Multiple_High_and_Add_Signed_Half_Word_Saturate_VC16':
> [all 2022-10-12 12:31:42] altivec.igen:1191:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
> [all 2022-10-12 12:31:42]  1191 |           sat |= tempsat;
> [all 2022-10-12 12:31:42]       |                ~~~~^~~~~~    
> [all 2022-10-12 12:31:42] altivec.igen:1181:21: note: 'sat' was declared here
> [all 2022-10-12 12:31:42]  1181 |         int i, sat, tempsat;
> [all 2022-10-12 12:31:42]       |                     ^~~
> [all 2022-10-12 12:31:42] altivec.igen: In function 'icache_Vector_Multiple_High_Round_and_Add_Signed_Half_Word_Saturate_VC16':
> [all 2022-10-12 12:31:42] altivec.igen:1208:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
> [all 2022-10-12 12:31:42]  1208 |           sat |= tempsat;
> [all 2022-10-12 12:31:42]       |                ~~~~^~~~~~    
> [all 2022-10-12 12:31:42] altivec.igen:1197:21: note: 'sat' was declared here
> [all 2022-10-12 12:31:42]  1197 |         int i, sat, tempsat;
> [all 2022-10-12 12:31:42]       |                     ^~~
> [all 2022-10-12 12:31:43] altivec.igen: In function 'icache_Vector_Multiple_High_and_Add_Signed_Half_Word_Saturate_VC17':
> [all 2022-10-12 12:31:43] altivec.igen:1191:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
> [all 2022-10-12 12:31:43]  1191 |           sat |= tempsat;
> [all 2022-10-12 12:31:43]       |                ~~~~^~~~~~    
> [all 2022-10-12 12:31:43] altivec.igen:1181:21: note: 'sat' was declared here
> [all 2022-10-12 12:31:43]  1181 |         int i, sat, tempsat;
> [all 2022-10-12 12:31:43]       |                     ^~~
> [all 2022-10-12 12:31:43] altivec.igen: In function 'icache_Vector_Multiple_High_Round_and_Add_Signed_Half_Word_Saturate_VC17':
> [all 2022-10-12 12:31:43] altivec.igen:1208:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
> [all 2022-10-12 12:31:43]  1208 |           sat |= tempsat;
> [all 2022-10-12 12:31:43]       |                ~~~~^~~~~~    
> [all 2022-10-12 12:31:43] altivec.igen:1197:21: note: 'sat' was declared here
> [all 2022-10-12 12:31:43]  1197 |         int i, sat, tempsat;
> [all 2022-10-12 12:31:43]       |                     ^~~
> [all 2022-10-12 12:31:44] altivec.igen: In function 'icache_Vector_Multiple_High_and_Add_Signed_Half_Word_Saturate_VC18':
> [all 2022-10-12 12:31:44] altivec.igen:1191:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
> [all 2022-10-12 12:31:44]  1191 |           sat |= tempsat;
> [all 2022-10-12 12:31:44]       |                ~~~~^~~~~~    
> [all 2022-10-12 12:31:44] altivec.igen:1181:21: note: 'sat' was declared here
> [all 2022-10-12 12:31:44]  1181 |         int i, sat, tempsat;
> [all 2022-10-12 12:31:44]       |                     ^~~
> [all 2022-10-12 12:31:44] altivec.igen: In function 'icache_Vector_Multiple_High_Round_and_Add_Signed_Half_Word_Saturate_VC18':
> [all 2022-10-12 12:31:44] altivec.igen:1208:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
> [all 2022-10-12 12:31:44]  1208 |           sat |= tempsat;
> [all 2022-10-12 12:31:44]       |                ~~~~^~~~~~    
> [all 2022-10-12 12:31:44] altivec.igen:1197:21: note: 'sat' was declared here
> [all 2022-10-12 12:31:44]  1197 |         int i, sat, tempsat;
> [all 2022-10-12 12:31:44]       |                     ^~~
> [all 2022-10-12 12:31:45] altivec.igen: In function 'icache_Vector_Multiple_High_and_Add_Signed_Half_Word_Saturate_VC19':
> [all 2022-10-12 12:31:45] altivec.igen:1191:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
> [all 2022-10-12 12:31:45]  1191 |           sat |= tempsat;
> [all 2022-10-12 12:31:45]       |                ~~~~^~~~~~    
> [all 2022-10-12 12:31:45] altivec.igen:1181:21: note: 'sat' was declared here
> [all 2022-10-12 12:31:45]  1181 |         int i, sat, tempsat;
> [all 2022-10-12 12:31:45]       |                     ^~~
> [all 2022-10-12 12:31:45] altivec.igen: In function 'icache_Vector_Multiple_High_Round_and_Add_Signed_Half_Word_Saturate_VC19':
> [all 2022-10-12 12:31:45] altivec.igen:1208:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
> [all 2022-10-12 12:31:45]  1208 |           sat |= tempsat;
> [all 2022-10-12 12:31:45]       |                ~~~~^~~~~~    
> [all 2022-10-12 12:31:45] altivec.igen:1197:21: note: 'sat' was declared here
> [all 2022-10-12 12:31:45]  1197 |         int i, sat, tempsat;
> [all 2022-10-12 12:31:45]       |                     ^~~
> [all 2022-10-12 12:31:46] altivec.igen: In function 'icache_Vector_Multiple_High_and_Add_Signed_Half_Word_Saturate_VC20':
> [all 2022-10-12 12:31:46] altivec.igen:1191:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
> [all 2022-10-12 12:31:46]  1191 |           sat |= tempsat;
> [all 2022-10-12 12:31:46]       |                ~~~~^~~~~~    
> [all 2022-10-12 12:31:46] altivec.igen:1181:21: note: 'sat' was declared here
> [all 2022-10-12 12:31:46]  1181 |         int i, sat, tempsat;
> [all 2022-10-12 12:31:46]       |                     ^~~
> [all 2022-10-12 12:31:46] altivec.igen: In function 'icache_Vector_Multiple_High_Round_and_Add_Signed_Half_Word_Saturate_VC20':
> [all 2022-10-12 12:31:46] altivec.igen:1208:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
> [all 2022-10-12 12:31:46]  1208 |           sat |= tempsat;
> [all 2022-10-12 12:31:46]       |                ~~~~^~~~~~    
> [all 2022-10-12 12:31:46] altivec.igen:1197:21: note: 'sat' was declared here
> [all 2022-10-12 12:31:46]  1197 |         int i, sat, tempsat;
> [all 2022-10-12 12:31:46]       |                     ^~~
> [all 2022-10-12 12:31:47] altivec.igen: In function 'icache_Vector_Multiple_High_and_Add_Signed_Half_Word_Saturate_VC21':
> [all 2022-10-12 12:31:47] altivec.igen:1191:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
> [all 2022-10-12 12:31:47]  1191 |           sat |= tempsat;
> [all 2022-10-12 12:31:47]       |                ~~~~^~~~~~    
> [all 2022-10-12 12:31:47] altivec.igen:1181:21: note: 'sat' was declared here
> [all 2022-10-12 12:31:47]  1181 |         int i, sat, tempsat;
> [all 2022-10-12 12:31:47]       |                     ^~~
> [all 2022-10-12 12:31:47] altivec.igen: In function 'icache_Vector_Multiple_High_Round_and_Add_Signed_Half_Word_Saturate_VC21':
> [all 2022-10-12 12:31:47] altivec.igen:1208:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
> [all 2022-10-12 12:31:47]  1208 |           sat |= tempsat;
> [all 2022-10-12 12:31:47]       |                ~~~~^~~~~~    
> [all 2022-10-12 12:31:47] altivec.igen:1197:21: note: 'sat' was declared here
> [all 2022-10-12 12:31:47]  1197 |         int i, sat, tempsat;
> [all 2022-10-12 12:31:47]       |                     ^~~
> [all 2022-10-12 12:31:48] altivec.igen: In function 'icache_Vector_Multiple_High_and_Add_Signed_Half_Word_Saturate_VC22':
> [all 2022-10-12 12:31:48] altivec.igen:1191:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
> [all 2022-10-12 12:31:48]  1191 |           sat |= tempsat;
> [all 2022-10-12 12:31:48]       |                ~~~~^~~~~~    
> [all 2022-10-12 12:31:48] altivec.igen:1181:21: note: 'sat' was declared here
> [all 2022-10-12 12:31:48]  1181 |         int i, sat, tempsat;
> [all 2022-10-12 12:31:48]       |                     ^~~
> [all 2022-10-12 12:31:48] altivec.igen: In function 'icache_Vector_Multiple_High_Round_and_Add_Signed_Half_Word_Saturate_VC22':
> [all 2022-10-12 12:31:48] altivec.igen:1208:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
> [all 2022-10-12 12:31:48]  1208 |           sat |= tempsat;
> [all 2022-10-12 12:31:48]       |                ~~~~^~~~~~    
> [all 2022-10-12 12:31:48] altivec.igen:1197:21: note: 'sat' was declared here
> [all 2022-10-12 12:31:48]  1197 |         int i, sat, tempsat;
> [all 2022-10-12 12:31:48]       |                     ^~~
> [all 2022-10-12 12:31:49] altivec.igen: In function 'icache_Vector_Multiple_High_and_Add_Signed_Half_Word_Saturate_VC23':
> [all 2022-10-12 12:31:49] altivec.igen:1191:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
> [all 2022-10-12 12:31:49]  1191 |           sat |= tempsat;
> [all 2022-10-12 12:31:49]       |                ~~~~^~~~~~    
> [all 2022-10-12 12:31:49] altivec.igen:1181:21: note: 'sat' was declared here
> [all 2022-10-12 12:31:49]  1181 |         int i, sat, tempsat;
> [all 2022-10-12 12:31:49]       |                     ^~~
> [all 2022-10-12 12:31:49] altivec.igen: In function 'icache_Vector_Multiple_High_Round_and_Add_Signed_Half_Word_Saturate_VC23':
> [all 2022-10-12 12:31:49] altivec.igen:1208:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
> [all 2022-10-12 12:31:49]  1208 |           sat |= tempsat;
> [all 2022-10-12 12:31:49]       |                ~~~~^~~~~~    
> [all 2022-10-12 12:31:49] altivec.igen:1197:21: note: 'sat' was declared here
> [all 2022-10-12 12:31:49]  1197 |         int i, sat, tempsat;
> [all 2022-10-12 12:31:49]       |                     ^~~
> [all 2022-10-12 12:31:50] altivec.igen: In function 'icache_Vector_Sum_Across_Partial_14_Unsigned_Byte_Saturate':
> [all 2022-10-12 12:31:50] altivec.igen:2303:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
> [all 2022-10-12 12:31:50]  2303 |           sat |= tempsat;
> [all 2022-10-12 12:31:50]       |                ~~~~^~~~~~    
> [all 2022-10-12 12:31:50] altivec.igen:2294:24: note: 'sat' was declared here
> [all 2022-10-12 12:31:50]  2294 |         int i, j, sat, tempsat;
> [all 2022-10-12 12:31:50]       |                        ^~~
> [all 2022-10-12 12:31:50] altivec.igen: In function 'icache_Vector_Multiple_High_and_Add_Signed_Half_Word_Saturate_VC24':
> [all 2022-10-12 12:31:50] altivec.igen:1191:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
> [all 2022-10-12 12:31:50]  1191 |           sat |= tempsat;
> [all 2022-10-12 12:31:50]       |                ~~~~^~~~~~    
> [all 2022-10-12 12:31:50] altivec.igen:1181:21: note: 'sat' was declared here
> [all 2022-10-12 12:31:50]  1181 |         int i, sat, tempsat;
> [all 2022-10-12 12:31:50]       |                     ^~~
> [all 2022-10-12 12:31:50] altivec.igen: In function 'icache_Vector_Multiple_High_Round_and_Add_Signed_Half_Word_Saturate_VC24':
> [all 2022-10-12 12:31:50] altivec.igen:1208:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
> [all 2022-10-12 12:31:50]  1208 |           sat |= tempsat;
> [all 2022-10-12 12:31:50]       |                ~~~~^~~~~~    
> [all 2022-10-12 12:31:50] altivec.igen:1197:21: note: 'sat' was declared here
> [all 2022-10-12 12:31:50]  1197 |         int i, sat, tempsat;
> [all 2022-10-12 12:31:50]       |                     ^~~
> [all 2022-10-12 12:31:51] altivec.igen: In function 'icache_Vector_Subtract_Unsigned_Half_Word_Saturate':
> [all 2022-10-12 12:31:51] altivec.igen:2216:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
> [all 2022-10-12 12:31:51]  2216 |           sat |= tempsat;
> [all 2022-10-12 12:31:51]       |                ~~~~^~~~~~    
> [all 2022-10-12 12:31:51] altivec.igen:2211:21: note: 'sat' was declared here
> [all 2022-10-12 12:31:51]  2211 |         int i, sat, tempsat;
> [all 2022-10-12 12:31:51]       |                     ^~~
> [all 2022-10-12 12:31:51] altivec.igen: In function 'icache_Vector_Sum_Across_Partial_14_Signed_Half_Word_Saturate':
> [all 2022-10-12 12:31:51] altivec.igen:2288:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
> [all 2022-10-12 12:31:51]  2288 |           sat |= tempsat;
> [all 2022-10-12 12:31:51]       |                ~~~~^~~~~~    
> [all 2022-10-12 12:31:51] altivec.igen:2281:24: note: 'sat' was declared here
> [all 2022-10-12 12:31:51]  2281 |         int i, j, sat, tempsat;
> [all 2022-10-12 12:31:51]       |                        ^~~
> [all 2022-10-12 12:31:52] altivec.igen: In function 'icache_Vector_Multiple_High_and_Add_Signed_Half_Word_Saturate_VC25':
> [all 2022-10-12 12:31:52] altivec.igen:1191:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
> [all 2022-10-12 12:31:52]  1191 |           sat |= tempsat;
> [all 2022-10-12 12:31:52]       |                ~~~~^~~~~~    
> [all 2022-10-12 12:31:52] altivec.igen:1181:21: note: 'sat' was declared here
> [all 2022-10-12 12:31:52]  1181 |         int i, sat, tempsat;
> [all 2022-10-12 12:31:52]       |                     ^~~
> [all 2022-10-12 12:31:52] altivec.igen: In function 'icache_Vector_Multiple_High_Round_and_Add_Signed_Half_Word_Saturate_VC25':
> [all 2022-10-12 12:31:52] altivec.igen:1208:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
> [all 2022-10-12 12:31:52]  1208 |           sat |= tempsat;
> [all 2022-10-12 12:31:52]       |                ~~~~^~~~~~    
> [all 2022-10-12 12:31:52] altivec.igen:1197:21: note: 'sat' was declared here
> [all 2022-10-12 12:31:52]  1197 |         int i, sat, tempsat;
> [all 2022-10-12 12:31:52]       |                     ^~~
> [all 2022-10-12 12:31:53] altivec.igen: In function 'icache_Vector_Subtract_Unsigned_Word_Saturate':
> [all 2022-10-12 12:31:53] altivec.igen:2233:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
> [all 2022-10-12 12:31:53]  2233 |           sat |= tempsat;
> [all 2022-10-12 12:31:53]       |                ~~~~^~~~~~    
> [all 2022-10-12 12:31:53] altivec.igen:2228:21: note: 'sat' was declared here
> [all 2022-10-12 12:31:53]  2228 |         int i, sat, tempsat;
> [all 2022-10-12 12:31:53]       |                     ^~~
> [all 2022-10-12 12:31:53] altivec.igen: In function 'icache_Vector_Sum_Across_Partial_12_Signed_Word_Saturate':
> [all 2022-10-12 12:31:53] altivec.igen:2261:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
> [all 2022-10-12 12:31:53]  2261 |           sat |= tempsat;
> [all 2022-10-12 12:31:53]       |                ~~~~^~~~~~    
> [all 2022-10-12 12:31:53] altivec.igen:2255:24: note: 'sat' was declared here
> [all 2022-10-12 12:31:53]  2255 |         int i, j, sat, tempsat;
> [all 2022-10-12 12:31:53]       |                        ^~~
> [all 2022-10-12 12:31:53] altivec.igen: In function 'icache_Vector_Multiple_High_and_Add_Signed_Half_Word_Saturate_VC26':
> [all 2022-10-12 12:31:53] altivec.igen:1191:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
> [all 2022-10-12 12:31:53]  1191 |           sat |= tempsat;
> [all 2022-10-12 12:31:53]       |                ~~~~^~~~~~    
> [all 2022-10-12 12:31:53] altivec.igen:1181:21: note: 'sat' was declared here
> [all 2022-10-12 12:31:53]  1181 |         int i, sat, tempsat;
> [all 2022-10-12 12:31:53]       |                     ^~~
> [all 2022-10-12 12:31:53] altivec.igen: In function 'icache_Vector_Multiple_High_Round_and_Add_Signed_Half_Word_Saturate_VC26':
> [all 2022-10-12 12:31:53] altivec.igen:1208:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
> [all 2022-10-12 12:31:53]  1208 |           sat |= tempsat;
> [all 2022-10-12 12:31:53]       |                ~~~~^~~~~~    
> [all 2022-10-12 12:31:53] altivec.igen:1197:21: note: 'sat' was declared here
> [all 2022-10-12 12:31:53]  1197 |         int i, sat, tempsat;
> [all 2022-10-12 12:31:53]       |                     ^~~
> [all 2022-10-12 12:31:54] altivec.igen: In function 'icache_Vector_Multiple_High_and_Add_Signed_Half_Word_Saturate_VC27':
> [all 2022-10-12 12:31:54] altivec.igen:1191:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
> [all 2022-10-12 12:31:54]  1191 |           sat |= tempsat;
> [all 2022-10-12 12:31:54]       |                ~~~~^~~~~~    
> [all 2022-10-12 12:31:54] altivec.igen:1181:21: note: 'sat' was declared here
> [all 2022-10-12 12:31:54]  1181 |         int i, sat, tempsat;
> [all 2022-10-12 12:31:54]       |                     ^~~
> [all 2022-10-12 12:31:54] altivec.igen: In function 'icache_Vector_Multiple_High_Round_and_Add_Signed_Half_Word_Saturate_VC27':
> [all 2022-10-12 12:31:54] altivec.igen:1208:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
> [all 2022-10-12 12:31:54]  1208 |           sat |= tempsat;
> [all 2022-10-12 12:31:54]       |                ~~~~^~~~~~    
> [all 2022-10-12 12:31:54] altivec.igen:1197:21: note: 'sat' was declared here
> [all 2022-10-12 12:31:54]  1197 |         int i, sat, tempsat;
> [all 2022-10-12 12:31:54]       |                     ^~~
> [all 2022-10-12 12:31:55] altivec.igen: In function 'icache_Vector_Sum_Across_Partial_14_Signed_Byte_Saturate':
> [all 2022-10-12 12:31:55] altivec.igen:2275:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
> [all 2022-10-12 12:31:55]  2275 |           sat |= tempsat;
> [all 2022-10-12 12:31:55]       |                ~~~~^~~~~~    
> [all 2022-10-12 12:31:55] altivec.igen:2268:24: note: 'sat' was declared here
> [all 2022-10-12 12:31:55]  2268 |         int i, j, sat, tempsat;
> [all 2022-10-12 12:31:55]       |                        ^~~
> [all 2022-10-12 12:31:55] altivec.igen: In function 'icache_Vector_Multiple_High_and_Add_Signed_Half_Word_Saturate_VC28':
> [all 2022-10-12 12:31:55] altivec.igen:1191:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
> [all 2022-10-12 12:31:55]  1191 |           sat |= tempsat;
> [all 2022-10-12 12:31:55]       |                ~~~~^~~~~~    
> [all 2022-10-12 12:31:55] altivec.igen:1181:21: note: 'sat' was declared here
> [all 2022-10-12 12:31:55]  1181 |         int i, sat, tempsat;
> [all 2022-10-12 12:31:55]       |                     ^~~
> [all 2022-10-12 12:31:55] altivec.igen: In function 'icache_Vector_Multiple_High_Round_and_Add_Signed_Half_Word_Saturate_VC28':
> [all 2022-10-12 12:31:55] altivec.igen:1208:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
> [all 2022-10-12 12:31:55]  1208 |           sat |= tempsat;
> [all 2022-10-12 12:31:55]       |                ~~~~^~~~~~    
> [all 2022-10-12 12:31:55] altivec.igen:1197:21: note: 'sat' was declared here
> [all 2022-10-12 12:31:55]  1197 |         int i, sat, tempsat;
> [all 2022-10-12 12:31:55]       |                     ^~~
> [all 2022-10-12 12:31:56] altivec.igen: In function 'icache_Vector_Multiple_High_and_Add_Signed_Half_Word_Saturate_VC29':
> [all 2022-10-12 12:31:56] altivec.igen:1191:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
> [all 2022-10-12 12:31:56]  1191 |           sat |= tempsat;
> [all 2022-10-12 12:31:56]       |                ~~~~^~~~~~    
> [all 2022-10-12 12:31:56] altivec.igen:1181:21: note: 'sat' was declared here
> [all 2022-10-12 12:31:56]  1181 |         int i, sat, tempsat;
> [all 2022-10-12 12:31:56]       |                     ^~~
> [all 2022-10-12 12:31:56] altivec.igen: In function 'icache_Vector_Multiple_High_Round_and_Add_Signed_Half_Word_Saturate_VC29':
> [all 2022-10-12 12:31:56] altivec.igen:1208:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
> [all 2022-10-12 12:31:56]  1208 |           sat |= tempsat;
> [all 2022-10-12 12:31:56]       |                ~~~~^~~~~~    
> [all 2022-10-12 12:31:56] altivec.igen:1197:21: note: 'sat' was declared here
> [all 2022-10-12 12:31:56]  1197 |         int i, sat, tempsat;
> [all 2022-10-12 12:31:56]       |                     ^~~
> [all 2022-10-12 12:31:57] altivec.igen: In function 'icache_Vector_Multiple_High_and_Add_Signed_Half_Word_Saturate_VC30':
> [all 2022-10-12 12:31:57] altivec.igen:1191:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
> [all 2022-10-12 12:31:57]  1191 |           sat |= tempsat;
> [all 2022-10-12 12:31:57]       |                ~~~~^~~~~~    
> [all 2022-10-12 12:31:57] altivec.igen:1181:21: note: 'sat' was declared here
> [all 2022-10-12 12:31:57]  1181 |         int i, sat, tempsat;
> [all 2022-10-12 12:31:57]       |                     ^~~
> [all 2022-10-12 12:31:57] altivec.igen: In function 'icache_Vector_Multiple_High_Round_and_Add_Signed_Half_Word_Saturate_VC30':
> [all 2022-10-12 12:31:57] altivec.igen:1208:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
> [all 2022-10-12 12:31:57]  1208 |           sat |= tempsat;
> [all 2022-10-12 12:31:57]       |                ~~~~^~~~~~    
> [all 2022-10-12 12:31:57] altivec.igen:1197:21: note: 'sat' was declared here
> [all 2022-10-12 12:31:57]  1197 |         int i, sat, tempsat;
> [all 2022-10-12 12:31:57]       |                     ^~~
> [all 2022-10-12 12:31:58] altivec.igen: In function 'icache_Vector_Multiple_High_and_Add_Signed_Half_Word_Saturate_VC31':
> [all 2022-10-12 12:31:58] altivec.igen:1191:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
> [all 2022-10-12 12:31:58]  1191 |           sat |= tempsat;
> [all 2022-10-12 12:31:58]       |                ~~~~^~~~~~    
> [all 2022-10-12 12:31:58] altivec.igen:1181:21: note: 'sat' was declared here
> [all 2022-10-12 12:31:58]  1181 |         int i, sat, tempsat;
> [all 2022-10-12 12:31:58]       |                     ^~~
> [all 2022-10-12 12:31:58] altivec.igen: In function 'icache_Vector_Multiple_High_Round_and_Add_Signed_Half_Word_Saturate_VC31':
> [all 2022-10-12 12:31:58] altivec.igen:1208:20: warning: 'sat' may be used uninitialized [-Wmaybe-uninitialized]
> [all 2022-10-12 12:31:58]  1208 |           sat |= tempsat;
> [all 2022-10-12 12:31:58]       |                ~~~~^~~~~~    
> [all 2022-10-12 12:31:58] altivec.igen:1197:21: note: 'sat' was declared here
> [all 2022-10-12 12:31:58]  1197 |         int i, sat, tempsat;
> [all 2022-10-12 12:31:58]       |                     ^~~
> [all 2022-10-12 12:32:57] cc1: all warnings being treated as errors
> [all 2022-10-12 12:32:57] make[3]: *** [Makefile:144: icache.o] Error 1
> [all 2022-10-12 12:32:57] make[3]: Leaving directory '/var/lib/laminar/run/gdb-powerpc-eabialtivec/7/binutils-gdb/sim/ppc'
> [all 2022-10-12 12:32:57] make[2]: *** [Makefile:1933: all-recursive] Error 1
> [all 2022-10-12 12:32:57] make[2]: Leaving directory '/var/lib/laminar/run/gdb-powerpc-eabialtivec/7/binutils-gdb/sim'
> [all 2022-10-12 12:32:57] make[1]: *** [Makefile:1185: all] Error 2
> [all 2022-10-12 12:32:57] make[1]: Leaving directory '/var/lib/laminar/run/gdb-powerpc-eabialtivec/7/binutils-gdb/sim'
> [all 2022-10-12 12:32:57] make: *** [Makefile:11309: all-sim] Error 2
> 
> 
> Something for a ticket?
> 
> MfG, JBG
> 

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH 1/1] sim/ppc: Fix core_find_mapping diagnostics
  2022-10-12 12:38             ` [PATCH 1/1] sim/ppc: Fix core_find_mapping diagnostics Tsukasa OI
@ 2022-10-12 13:50               ` Andrew Burgess
  0 siblings, 0 replies; 32+ messages in thread
From: Andrew Burgess @ 2022-10-12 13:50 UTC (permalink / raw)
  To: Tsukasa OI, Tsukasa OI, Tom de Vries; +Cc: gdb-patches

Tsukasa OI <research_trasio@irq.a4lg.com> writes:

> Because "%p" is the pointer conversion specifier to print a pointer in an
> implementation-defined manner, the result with format string containing
> "0x%p" can be strange.  For instance, core_map_find_mapping prints error
> containing "0x0x...." (processor is not NULL) or "0x(null)" (processor is
> NULL) on glibc.
>
> This commit replaces "0x%p" with "%p" to prevent unpredictable
> behavior.

Thanks, please go ahead and push.

Thanks,
Andrew


> ---
>  sim/ppc/corefile.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/sim/ppc/corefile.c b/sim/ppc/corefile.c
> index b2faef58c5b..ee4e2cf733e 100644
> --- a/sim/ppc/corefile.c
> +++ b/sim/ppc/corefile.c
> @@ -292,7 +292,7 @@ core_map_find_mapping(core_map *map,
>      mapping = mapping->next;
>    }
>    if (abort)
> -    error("core_find_mapping() - access to unmaped address, attach a default map to handle this - addr=0x%x nr_bytes=0x%x processor=0x%p cia=0x%x\n",
> +    error("core_find_mapping() - access to unmaped address, attach a default map to handle this - addr=0x%x nr_bytes=0x%x processor=%p cia=0x%x\n",
>  	  addr, nr_bytes, (void *) processor, cia);
>    return NULL;
>  }
> -- 
> 2.34.1


^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH v2 6/7] sim/ppc: Add ATTRIBUTE_PRINTF
  2022-10-12  9:39         ` Andrew Burgess
  2022-10-12 10:36           ` Jan-Benedict Glaw
  2022-10-12 12:38           ` [PATCH 0/1] sim/ppc: Fix erroneous error calls (supplement) Tsukasa OI
@ 2022-10-23 12:46           ` Mike Frysinger
  2 siblings, 0 replies; 32+ messages in thread
From: Mike Frysinger @ 2022-10-23 12:46 UTC (permalink / raw)
  To: Andrew Burgess
  Cc: Jan-Benedict Glaw, Tsukasa OI, Stephane Carrez,
	Frank Ch . Eigler, gdb-patches

[-- Attachment #1: Type: text/plain, Size: 1173 bytes --]

On 12 Oct 2022 10:39, Andrew Burgess wrote:
> --- a/sim/ppc/corefile.c
> +++ b/sim/ppc/corefile.c
> @@ -292,8 +292,8 @@ core_map_find_mapping(core_map *map,
>      mapping = mapping->next;
>    }
>    if (abort)
> -    error("core_find_mapping() - access to unmaped address, attach a default map to handle this - addr=0x%x nr_bytes=0x%x processor=0x%x cia=0x%x\n",
> -	  addr, nr_bytes, processor, cia);
> +    error("core_find_mapping() - access to unmaped address, attach a default map to handle this - addr=0x%x nr_bytes=0x%x processor=0x%p cia=0x%x\n",

no 0x before %p

> +	  addr, nr_bytes, (void *) processor, cia);

why do you need (void*) cast ?  %p takes pointer of any type.

> --- a/sim/ppc/emul_chirp.c
> +++ b/sim/ppc/emul_chirp.c
> @@ -1509,7 +1509,7 @@ map_over_chirp_note(bfd *image,
>        return;
>      /* check the name field */
>      if (head.namesz > sizeof(name)) {
> -      error("chirp: note name too long (%d > %d)\n", (int)head.namesz, sizeof(name));
> +      error("chirp: note name too long (%d > %d)\n", (int)head.namesz, (int)sizeof(name));

please fix the format string instead of casting to random types.
sizeof uses %zu, not %d.
-mike

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 32+ messages in thread

end of thread, other threads:[~2022-10-23 14:00 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-25  8:44 [PATCH 0/7] sim, sim/ARCH: Add ATTRIBUTE_PRINTF Tsukasa OI
2022-09-25  8:44 ` [PATCH 1/7] sim: " Tsukasa OI
2022-09-25  8:44 ` [PATCH 2/7] sim/cris: " Tsukasa OI
2022-09-25  8:44 ` [PATCH 3/7] sim/erc32: " Tsukasa OI
2022-09-25  8:44 ` [PATCH 4/7] sim/m32c: " Tsukasa OI
2022-09-25  8:44 ` [PATCH 5/7] sim/m68hc11: " Tsukasa OI
2022-09-25  8:44 ` [PATCH 6/7] sim/ppc: " Tsukasa OI
2022-10-05 10:57   ` Andrew Burgess
2022-10-06  5:32     ` Tsukasa OI
2022-09-25  8:44 ` [PATCH 7/7] sim/rl78: " Tsukasa OI
2022-10-06  6:36 ` [PATCH v2 0/7] sim, sim/ARCH: " Tsukasa OI
2022-10-06  6:36   ` [PATCH v2 1/7] sim: " Tsukasa OI
2022-10-11 14:24     ` Andrew Burgess
2022-10-06  6:36   ` [PATCH v2 2/7] sim/cris: " Tsukasa OI
2022-10-06  6:36   ` [PATCH v2 3/7] sim/erc32: " Tsukasa OI
2022-10-06  6:36   ` [PATCH v2 4/7] sim/m32c: " Tsukasa OI
2022-10-06  6:36   ` [PATCH v2 5/7] sim/m68hc11: " Tsukasa OI
2022-10-11 14:25     ` Andrew Burgess
2022-10-06  6:36   ` [PATCH v2 6/7] sim/ppc: " Tsukasa OI
2022-10-11 14:27     ` Andrew Burgess
2022-10-12  8:29       ` Jan-Benedict Glaw
2022-10-12  9:39         ` Andrew Burgess
2022-10-12 10:36           ` Jan-Benedict Glaw
2022-10-12 12:15             ` Jan-Benedict Glaw
2022-10-12 12:50             ` Jan-Benedict Glaw
2022-10-12 13:16               ` Tsukasa OI
2022-10-12 12:38           ` [PATCH 0/1] sim/ppc: Fix erroneous error calls (supplement) Tsukasa OI
2022-10-12 12:38             ` [PATCH 1/1] sim/ppc: Fix core_find_mapping diagnostics Tsukasa OI
2022-10-12 13:50               ` Andrew Burgess
2022-10-23 12:46           ` [PATCH v2 6/7] sim/ppc: Add ATTRIBUTE_PRINTF Mike Frysinger
2022-10-06  6:36   ` [PATCH v2 7/7] sim/rl78: " Tsukasa OI
2022-10-11 14:23   ` [PATCH v2 0/7] sim, sim/ARCH: " Andrew Burgess

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).