From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 41226 invoked by alias); 21 Sep 2016 19:09:50 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 41216 invoked by uid 89); 21 Sep 2016 19:09:49 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.5 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM autolearn=no version=3.3.2 spammy=suggesting, our X-HELO: mail-yw0-f182.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:cc:from:organization :message-id:date:user-agent:mime-version:in-reply-to :content-transfer-encoding; bh=XGCGjOqKCxX5S1nKv95TDRvzSPdnW3C2aa9GgaQzHv4=; b=dT4P/3QmMgRo8eD6+oSLkzuS+fV7seSHIhO4bS8lZ0TlLXYckQ/Qs84M4I1JhEPYLo 54wwg47oDAe2XuXHOmQP/Fwy2V13xBoKQBXfs8/inh/4kAudhssOOD80hYFhTjfBT47E FanGzFK+bzBuiGpVnFfrkjWOgeDFeEBR54jK7EB1C76cn/DHSCn4zfWqEjocftLrYt/z b+/i3U7eqyWN4TuWWZQSXhp+AOJdDa9W0LPL7zkL8YsdZzAnEkuy8cw3XHfaf/hEy5BJ Hc+tkO10PWBxS8+jqp3r5hMPBg0ZNs8Ftp/f22K3UAjOizwy57u0dw+O3K1aID1IqYHx DAdQ== X-Gm-Message-State: AE9vXwNSfcIoxvT6MbJKghVNH7Vv7q7ZHpGi9IzWyPJBxZxVa6X1BKshvFqUiSqO2HB6TADH X-Received: by 10.13.223.22 with SMTP id i22mr30582758ywe.32.1474484986612; Wed, 21 Sep 2016 12:09:46 -0700 (PDT) Subject: Re: [PATCH 06/13] Installed header hygiene (BZ#20366): Macros used in #if without checking whether they are defined. To: Paul Eggert , Joseph Myers References: <20160830011645.25769-1-zackw@panix.com> <20160830011645.25769-2-zackw@panix.com> <20160830011645.25769-3-zackw@panix.com> <20160830011645.25769-4-zackw@panix.com> <20160830011645.25769-5-zackw@panix.com> <20160830011645.25769-6-zackw@panix.com> <20160830011645.25769-7-zackw@panix.com> <670d128e-b21a-b26c-8c5f-bc64bf68527e@redhat.com> <462e9837-ef26-3790-7e90-97fbf853a805@cs.ucla.edu> Cc: Zack Weinberg , libc-alpha@sourceware.org From: Carlos O'Donell Message-ID: <3caea07a-d3ff-c33b-3fcb-0e81f0629728@redhat.com> Date: Wed, 21 Sep 2016 19:09:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <462e9837-ef26-3790-7e90-97fbf853a805@cs.ucla.edu> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2016-09/txt/msg00419.txt.bz2 On 09/21/2016 02:46 PM, Paul Eggert wrote: > On 09/21/2016 11:40 AM, Carlos O'Donell wrote: >> Isn't that just a normal coordination issue with gnulib? > > I think so. Gnulib could readily change to follow whatever _LIBC > practice is thought to be convenient for libc itself. Thanks for confirming. Best practice for macro APIs, where possible, is to always define the macro e.g. set it to 0 or 1, and then enable the use of -Wundef to catch any mistakes. This isn't always possible with defines coming from other projects or the compiler itself (where behaviour is standardized), but in our own GNU projects I think we could adopt the less error prone usages. I'm not suggesting Zack tackle this now. -- Cheers, Carlos.