GNU bug report logs - #78885
[PATCH] maint: assume that compilers support '\a' as specified by C89

Previous Next

Package: sed;

Reported by: Collin Funk <collin.funk1 <at> gmail.com>

Date: Tue, 24 Jun 2025 04:45:02 UTC

Severity: normal

Tags: fixed, patch

Done: Collin Funk <collin.funk1 <at> gmail.com>

Full log


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

From: Collin Funk <collin.funk1 <at> gmail.com>
To: bug-sed <at> gnu.org
Subject: [PATCH] maint: assume that compilers support '\a' as specified by C89
Date: Mon, 23 Jun 2025 21:44:28 -0700
[Message part 1 (text/plain, inline)]
Hi,

I noticed some very old code:

    #if defined __STDC__ && __STDC__-0
               case 'a': *q++ = '\a'; p++; continue;
    #else /* Not STDC; we'll just assume ASCII */
              case 'a': *q++ = '\007'; p++; continue;
    #endif

This is from before C89 when '\a' was standardized. In sed/debug.c and
in Gnulib we already assume it is supported. So the fallback code can be
removed.

And if compilers don't support it, they most certainly have other larger
problems than this. :)

Collin

[0001-maint-assume-that-compilers-support-a-as-specified-b.patch (text/x-patch, attachment)]

This bug report was last modified 20 days ago.

Previous Next


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