Re: [RFC PATCH v3 37/78] target/hexagon: add fallthrough pseudo-keyword

2023-10-16 Thread Anton Johansson via
On 13/10/23, Emmanouil Pitsidianakis wrote:
> In preparation of raising -Wimplicit-fallthrough to 5, replace all
> fall-through comments with the fallthrough attribute pseudo-keyword.
> 
> Signed-off-by: Emmanouil Pitsidianakis 
> ---
>  target/hexagon/idef-parser/parser-helpers.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)

Reviewed-by: Anton Johansson 



[RFC PATCH v3 37/78] target/hexagon: add fallthrough pseudo-keyword

2023-10-13 Thread Emmanouil Pitsidianakis
In preparation of raising -Wimplicit-fallthrough to 5, replace all
fall-through comments with the fallthrough attribute pseudo-keyword.

Signed-off-by: Emmanouil Pitsidianakis 
---
 target/hexagon/idef-parser/parser-helpers.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/target/hexagon/idef-parser/parser-helpers.c 
b/target/hexagon/idef-parser/parser-helpers.c
index 4af020933a..0f1713ae4c 100644
--- a/target/hexagon/idef-parser/parser-helpers.c
+++ b/target/hexagon/idef-parser/parser-helpers.c
@@ -29,6 +29,7 @@
 #include "parser-helpers.h"
 #include "idef-parser.tab.h"
 #include "idef-parser.yy.h"
+#include "qemu/compiler.h"
 
 void yyerror(YYLTYPE *locp,
  yyscan_t scanner __attribute__((unused)),
@@ -645,7 +646,7 @@ static void gen_asl_op(Context *c, YYLTYPE *locp, unsigned 
bit_width,
 case IMM_REG:
 op1_m.bit_width = bit_width;
 op1_m = rvalue_materialize(c, locp, &op1_m);
-/* fallthrough */
+fallthrough;
 case REG_REG: {
 OUT(c, locp, "tcg_gen_shl_", bit_suffix,
 "(", res, ", ", &op1_m, ", ", op2, ");\n");
@@ -829,7 +830,7 @@ static void gen_minmax_op(Context *c, YYLTYPE *locp, 
unsigned bit_width,
 case REG_IMM:
 op2_m.bit_width = bit_width;
 op2_m = rvalue_materialize(c, locp, &op2_m);
-/* Fallthrough */
+fallthrough;
 case REG_REG:
 OUT(c, locp, mm, "_i", &bit_width, "(");
 OUT(c, locp, res, ", ", op1, ", ", &op2_m, ");\n");
-- 
2.39.2