From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 123949 invoked by alias); 10 Jan 2019 14:37:04 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 123938 invoked by uid 89); 10 Jan 2019 14:37:03 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY,SPF_HELO_PASS autolearn=no version=3.3.2 spammy= X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 10 Jan 2019 14:37:02 +0000 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6C72BC068BFD for ; Thu, 10 Jan 2019 14:37:01 +0000 (UTC) Received: from tucnak.zalov.cz (ovpn-116-18.ams2.redhat.com [10.36.116.18]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 12C62672E5; Thu, 10 Jan 2019 14:37:00 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.15.2/8.15.2) with ESMTP id x0AEaxCf008523; Thu, 10 Jan 2019 15:36:59 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.15.2/8.15.2/Submit) id x0AEawrt008522; Thu, 10 Jan 2019 15:36:58 +0100 Date: Thu, 10 Jan 2019 14:37:00 -0000 From: Jakub Jelinek To: Florian Weimer Cc: gcc@gcc.gnu.org Subject: Re: __has_include__ is problematic Message-ID: <20190110143658.GY30353@tucnak> Reply-To: Jakub Jelinek References: <87ef9kk304.fsf@oldenburg2.str.redhat.com> <20190110143230.GX30353@tucnak> <877efck2cd.fsf@oldenburg2.str.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <877efck2cd.fsf@oldenburg2.str.redhat.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-IsSubscribed: yes X-SW-Source: 2019-01/txt/msg00073.txt.bz2 On Thu, Jan 10, 2019 at 03:35:14PM +0100, Florian Weimer wrote: > * Jakub Jelinek: > > > On Thu, Jan 10, 2019 at 03:20:59PM +0100, Florian Weimer wrote: > >> Can we remove __has_include__? > > > > No. > > > >> Its availability results in code which is needlessly non-portable > >> because for some reason, people write __has_include__ instead of > >> __has_include. (I don't think there is any difference.) > > > > __has_include needs to be a macro, while __has_include__ is a weirdo > > builtin that does all the magic. But one needs to be able to > > #ifdef __has_include > > etc. > > Why doesn't a synthetic > > #define __has_include __has_include > > work? Because the magic builtin is a preprocessor builtin, kind of macro, so you can't have a normal macro with the same name. Jakub