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.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#78032: closed (new compilation error)
Date: Mon, 28 Apr 2025 06:46:01 +0000
[Message part 1 (text/plain, inline)]
Your message dated Sun, 27 Apr 2025 23:44:57 -0700
with message-id <afab6b23-de6e-428d-8e73-855afb449766 <at> cs.ucla.edu>
and subject line Re: [bug-diffutils] bug#78032: new compilation error
has caused the debbugs.gnu.org bug report #78032,
regarding new compilation error
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
78032: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=78032
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
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





[Message part 3 (message/rfc822, inline)]
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 4 (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)]

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.