GNU bug report logs - #78032
new compilation error

Previous Next

Package: diffutils;

Reported by: Bruno Haible <bruno <at> clisp.org>

Date: Thu, 24 Apr 2025 10:58:08 UTC

Severity: normal

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 78032 in the body.
You can then email your comments to 78032 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-diffutils <at> gnu.org:
bug#78032; Package diffutils. (Thu, 24 Apr 2025 10:58:11 GMT) Full text and rfc822 format available.

Acknowledgement sent to Bruno Haible <bruno <at> clisp.org>:
New bug report received and forwarded. Copy sent to bug-diffutils <at> gnu.org. (Thu, 24 Apr 2025 10:58:11 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Bruno Haible <bruno <at> clisp.org>
To: bug-diffutils <at> gnu.org
Subject: new compilation error
Date: Thu, 24 Apr 2025 12:57:02 +0200
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







Reply sent to Paul Eggert <eggert <at> cs.ucla.edu>:
You have taken responsibility. (Mon, 28 Apr 2025 06:46:01 GMT) Full text and rfc822 format available.

Notification sent to Bruno Haible <bruno <at> clisp.org>:
bug acknowledged by developer. (Mon, 28 Apr 2025 06:46:01 GMT) Full text and rfc822 format available.

Message #10 received at 78032-done <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Bruno Haible <bruno <at> clisp.org>
Cc: 78032-done <at> debbugs.gnu.org
Subject: Re: [bug-diffutils] bug#78032: new compilation error
Date: Sun, 27 Apr 2025 23:44:57 -0700
[Message part 1 (text/plain, inline)]
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.
[0001-sdiff-port-back-to-C17.patch (text/x-patch, attachment)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 26 May 2025 11:24:08 GMT) Full text and rfc822 format available.

This bug report was last modified 23 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.