Subject: new compilation error
From: Bruno Haible <[email-masked]>
To: [email-masked]
Date: Thu, 24 Apr 2025 12:57:02 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi Paul,

The CI reports a compilation error of GNU diffutils, caused by the
most recent commit 45a4762bf3241e7fb6a2e01d382791ae44236841 .

Error seen on CentOS 7 (with gcc):

../../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 ();
        ^
make[2]: *** [sdiff.o] Error 1

Errors seen on macOS 15 and FreeBSD (with clang):

../../src/sdiff.c:884:8: error: expected expression
  884 |               int cmd1 = skip_white ();
      |               ^
../../src/sdiff.c:885:23: error: use of undeclared identifier 'cmd1'; did you mean 'cmd'?
  885 |               switch (cmd1)
      |                       ^~~~
      |                       cmd
...

Bruno