public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "joseph at codesourcery dot com" <sourceware-bugzilla@sourceware.org>
To: glibc-bugs@sourceware.org
Subject: [Bug build/27596] bits/libc-header-start.h is C++ header-unit unfriendly
Date: Wed, 17 Mar 2021 20:36:47 +0000	[thread overview]
Message-ID: <bug-27596-131-0i04TVO1gS@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-27596-131@http.sourceware.org/bugzilla/>

https://sourceware.org/bugzilla/show_bug.cgi?id=27596

--- Comment #1 from joseph at codesourcery dot com <joseph at codesourcery dot com> ---
The handling of __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION is a check 
to discourage external users from using something that's not a public API, 
rather than something strictly required.

bits/libc-header-start.h will produce different macro definitions when 
included with different feature test macros defined.  It's valid for that 
to occur within the compilation of a single translation unit - for one of 
the ISO C feature test macros to be defined after some headers have been 
included and before others are included.  The peculiarities of how those 
ISO C feature test macros are defined are why this header is separate from 
features.h and can't have multiple-include protection.

If the rules that the definitions from a header depend on what feature 
test macros were defined when *that header* is first included (as opposed 
to it being required to define feature test macros before including any 
standard header, as in POSIX) are problematic for C++, that seems like a 
good thing to raise on the C/C++ liaison mailing list.  Or is the issue 
only with the particular approach to implementing that requirement, rather 
than with the requirement itself?

-- 
You are receiving this mail because:
You are on the CC list for the bug.

  reply	other threads:[~2021-03-17 20:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-17 13:35 [Bug build/27596] New: " nathan at acm dot org
2021-03-17 20:36 ` joseph at codesourcery dot com [this message]
2021-03-18 11:35 ` [Bug build/27596] " nathan at acm dot org

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=bug-27596-131-0i04TVO1gS@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=glibc-bugs@sourceware.org \
    /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).