Subject: Re: [bug-diffutils] bug#78032: new compilation error

From: Paul Eggert <[email-masked]>
Date: Sun, 27 Apr 2025 23:44:57 -0700

On 2025-04-24 03:57, Bruno Haible via bug-diffutils via All diffutils 
discussion. wrote:
> ../../src/sdiff.c: In function 'edit':
> ../../src/sdiff.c:884:8: error: a label can only be part of a statement and a declaration is not a statement
>          int cmd1 = skip_white ();

Thanks for reporting that. I installed the attached to fix it.

From 686357a40ca038edc902276cb3b33f4757d8cfb2 Mon Sep 17 00:00:00 2001
From: Paul Eggert <[email-masked]>
Date: Sat, 26 Apr 2025 12:54:06 -0700
Subject: [PATCH] sdiff: port back to C17-

* src/sdiff.c (edit): Do not use a label just before a statement.
Problem reported by Bruno Haible (Bug#78032).
---
 src/sdiff.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/sdiff.c b/src/sdiff.c
index 15b8dce..cc961c3 100644
--- a/src/sdiff.c
+++ b/src/sdiff.c
@@ -880,7 +880,7 @@ edit (struct line_filter *left, char const *lname, lin lline, lin llen,
                 }
               break;
 
-            case 'e':
+	    case 'e':;
 	      int cmd1 = skip_white ();
               switch (cmd1)
                 {
-- 
2.48.1