public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Nathan Sidwell <nathan@acm.org>
To: Jakub Jelinek <jakub@redhat.com>, Florian Weimer <fweimer@redhat.com>
Cc: gcc@gcc.gnu.org
Subject: Re: __has_include__ is problematic
Date: Mon, 14 Jan 2019 21:40:00 -0000	[thread overview]
Message-ID: <830f643e-d5a0-72be-abd6-e8a78c861c12@acm.org> (raw)
In-Reply-To: <20190110143230.GX30353@tucnak>

On 1/10/19 9:32 AM, Jakub Jelinek wrote:
> 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 not give the wierdo __has_include__ an unspellable name? 
('builtin<SPACE>has<SPACE>include') and take care constructing the 
__has_include macro expansion to have a token with exactly that spelling?

nathan

-- 
Nathan Sidwell

  parent reply	other threads:[~2019-01-14 21:40 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-10 14:21 Florian Weimer
2019-01-10 14:32 ` Jakub Jelinek
2019-01-10 14:35   ` Florian Weimer
2019-01-10 14:37     ` Jakub Jelinek
2019-01-14 21:51       ` Florian Weimer
2019-01-14 21:40   ` Nathan Sidwell [this message]
2019-01-14 21:51     ` Florian Weimer
2019-01-15 12:27       ` Nathan Sidwell

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

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

  git send-email \
    --in-reply-to=830f643e-d5a0-72be-abd6-e8a78c861c12@acm.org \
    --to=nathan@acm.org \
    --cc=fweimer@redhat.com \
    --cc=gcc@gcc.gnu.org \
    --cc=jakub@redhat.com \
    /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.
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).