unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Kangas <stefan@marxist.se>
To: 51484@debbugs.gnu.org
Subject: bug#51484: [PATCH] Move runtime check for recent giflib to compile time
Date: Fri, 29 Oct 2021 07:42:56 -0700	[thread overview]
Message-ID: <CADwFkmmGxHTeSZxxGire3w33pAMMtYfJSU-yao7uCXWMN1PBWA@mail.gmail.com> (raw)

Severity: wishlist

I'm looking into some bugs in how we handle gifs, and I see that we
check for GIFLIB_MAJOR at runtime.  Is there any reason not to do it at
compile-time as in the attached patch?

I expect that GCC is smart enough to see that "5 < 4" is always false
and optimize this all away, and probably also won't include unused
static variables, so maybe this doesn't matter.  But I think it's nice
to be a bit more explicit, and I guess it can't hurt to see warnings if
anyone tries using interlace_start and interlace_increment outside of
their intended use.





             reply	other threads:[~2021-10-29 14:42 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-29 14:42 Stefan Kangas [this message]
2021-10-29 16:01 ` bug#51484: [PATCH] Move runtime check for recent giflib to compile time Lars Ingebrigtsen
2021-10-29 16:10 ` Eli Zaretskii
2021-10-29 16:30   ` Stefan Kangas
2021-10-29 17:57     ` Eli Zaretskii
2021-10-29 18:15       ` Stefan Kangas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CADwFkmmGxHTeSZxxGire3w33pAMMtYfJSU-yao7uCXWMN1PBWA@mail.gmail.com \
    --to=stefan@marxist.se \
    --cc=51484@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).