From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 118971 invoked by alias); 10 Jan 2019 14:35:19 -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 118961 invoked by uid 89); 10 Jan 2019 14:35:19 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS autolearn=ham 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:35:18 +0000 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 02B1F1F8C1 for ; Thu, 10 Jan 2019 14:35:17 +0000 (UTC) Received: from oldenburg2.str.redhat.com (ovpn-116-78.ams2.redhat.com [10.36.116.78]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2938A27C4B; Thu, 10 Jan 2019 14:35:15 +0000 (UTC) From: Florian Weimer To: Jakub Jelinek Cc: gcc@gcc.gnu.org Subject: Re: __has_include__ is problematic References: <87ef9kk304.fsf@oldenburg2.str.redhat.com> <20190110143230.GX30353@tucnak> Date: Thu, 10 Jan 2019 14:35:00 -0000 In-Reply-To: <20190110143230.GX30353@tucnak> (Jakub Jelinek's message of "Thu, 10 Jan 2019 15:32:30 +0100") Message-ID: <877efck2cd.fsf@oldenburg2.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-IsSubscribed: yes X-SW-Source: 2019-01/txt/msg00072.txt.bz2 * 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? Thanks, Florian