From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.bugs Subject: bug#51484: [PATCH] Move runtime check for recent giflib to compile time Date: Fri, 29 Oct 2021 07:42:56 -0700 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5221"; mail-complaints-to="usenet@ciao.gmane.io" To: 51484@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Oct 29 16:44:38 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mgT7W-0001Dc-9Y for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 29 Oct 2021 16:44:38 +0200 Original-Received: from localhost ([::1]:42736 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mgT7U-0008Mc-4V for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 29 Oct 2021 10:44:37 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47974) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mgT6x-0007F5-3Y for bug-gnu-emacs@gnu.org; Fri, 29 Oct 2021 10:44:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:44029) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mgT6w-0007QP-RJ for bug-gnu-emacs@gnu.org; Fri, 29 Oct 2021 10:44:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mgT6w-0007zh-J1 for bug-gnu-emacs@gnu.org; Fri, 29 Oct 2021 10:44:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 29 Oct 2021 14:44:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 51484 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.163551858430638 (code B ref -1); Fri, 29 Oct 2021 14:44:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 29 Oct 2021 14:43:04 +0000 Original-Received: from localhost ([127.0.0.1]:55575 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mgT60-0007y6-EI for submit@debbugs.gnu.org; Fri, 29 Oct 2021 10:43:04 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:43404) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mgT5w-0007xe-GP for submit@debbugs.gnu.org; Fri, 29 Oct 2021 10:43:03 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47616) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mgT5w-0006OB-8g for bug-gnu-emacs@gnu.org; Fri, 29 Oct 2021 10:43:00 -0400 Original-Received: from mail-pj1-f50.google.com ([209.85.216.50]:34394) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mgT5u-0007Hy-IE for bug-gnu-emacs@gnu.org; Fri, 29 Oct 2021 10:42:59 -0400 Original-Received: by mail-pj1-f50.google.com with SMTP id q2-20020a17090a2e0200b001a0fd4efd49so7468962pjd.1 for ; Fri, 29 Oct 2021 07:42:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:mime-version:date:message-id:subject:to; bh=cOmTNibscrlv1SnTQ8EloMsLDN4e0zTAIr72V1RtiLI=; b=xS0hAP/QPu5TaQ/oQ9yH90C2XHeafv/y63xqMZ1WptrIj9ruERp4rPndjTcH5JRmxv yQkW9c/4KBD5pQ0sOD4e8Cf61vFL8rE6umxy0R9WW3KxeN21w/ZxNiwz1+M2Bmamf4q5 MIWiAkk53ArjgGqAPr3T1dqfKve8r033PS8gNUdUfdFMUXr1gaS1cuU+uWkiDDDRiWOy sxsfy9Y0RkRxb0D/Bckg9lb3ycl3pCFokuAPHYstQ5rbWiYQxYxVfros9/gyqeOq9i2v TTd/t74qqYoXCy2vM58SOvjZI2yPYKRXVp94caGJiuhylobfhSuhWgU/fcZQSEyXqwgB SfXQ== X-Gm-Message-State: AOAM533+RpoAokLHa58XnTFOwOvkswYk6EHzwkEdqpAlEKMluHnngoPc T4EXQgd6/8IWl24P+VaAuK9H2p4lgQsjKeAaIuzPZ3+U X-Google-Smtp-Source: ABdhPJx0wO8+Mg6Bo3mcl8yCihSpph0s7xXOSOQfbxgbbjau8v12jRw2hbDEnlAO12iYoGh1b7nfNmUqlkU15Nq1LJI= X-Received: by 2002:a17:902:a410:b0:141:be1a:53d1 with SMTP id p16-20020a170902a41000b00141be1a53d1mr204481plq.71.1635518576814; Fri, 29 Oct 2021 07:42:56 -0700 (PDT) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Fri, 29 Oct 2021 07:42:56 -0700 Received-SPF: pass client-ip=209.85.216.50; envelope-from=stefankangas@gmail.com; helo=mail-pj1-f50.google.com X-Spam_score_int: -13 X-Spam_score: -1.4 X-Spam_bar: - X-Spam_report: (-1.4 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:218560 Archived-At: 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.