From: Paul Pluzhnikov <ppluzhnikov@google.com>
To: Jonathan Wakely <jwakely@redhat.com>
Cc: Rich Felker <dalias@libc.org>,
Florian Weimer <fweimer@redhat.com>,
Paul Pluzhnikov via Libc-alpha <libc-alpha@sourceware.org>
Subject: Re: [patch] Use __builtin_FILE and __builtin_LINE in assert implementation in C++
Date: Wed, 25 Jan 2023 12:50:41 -0800 [thread overview]
Message-ID: <CALoOobPD0pPxciksLtFfB_VGCS-oT_jm9wXzyfeY=sDFZesDeQ@mail.gmail.com> (raw)
In-Reply-To: <CACb0b4nXwwY73Eo3kFQ+cHs10GLgRd7SX15-YJo9EBV6hK6Piw@mail.gmail.com>
On Tue, Jan 24, 2023 at 3:54 AM Jonathan Wakely <jwakely@redhat.com> wrote:
> Added to GCC 4.8.0 in 2012. I don't know about Clang.
(Like I said in the original email.)
Clang implementation is quite a bit more recent:
commit 708afb56c125ca4f7db7070e836860076c7eafbc
Author: Eric Fiselier <eric@efcs.ca>
Date: Thu May 16 21:04:15 2019 +0000
Implement __builtin_LINE() et. al. to support source location capture.
I feel like a __has_builtin gate isn't really necessary here, but will
put one in if people think it's necessary.
On Tue, 24 Jan 2023 at 11:38, Rich Felker <dalias@libc.org> wrote:
> (Also, C++ programmers should stop putting so much code in inline
> functions in headers.
There are C++ projects (Boost, Eigen) which consist _entirely_ of headers.
It was Eigen that has triggered this thread.
We could rewrite eigen_assert() to use source_location instead of
assert(), but I thought fixing it here is better, since it fixes all
C++ projects and not just Eigen.
--
Paul Pluzhnikov
prev parent reply other threads:[~2023-01-25 20:51 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-17 19:28 Paul Pluzhnikov
2023-01-23 14:26 ` Florian Weimer
2023-01-24 11:10 ` Rich Felker
2023-01-24 11:19 ` Rich Felker
2023-01-24 11:19 ` Florian Weimer
2023-01-24 11:23 ` Rich Felker
2023-01-24 11:53 ` Jonathan Wakely
2023-01-24 12:08 ` Florian Weimer
2023-01-24 12:17 ` Jonathan Wakely
2023-01-24 15:07 ` Szabolcs Nagy
2023-01-24 15:51 ` Jonathan Wakely
2023-01-26 19:18 ` Paul Pluzhnikov
2023-01-27 15:43 ` Jonathan Wakely
2023-02-05 18:39 ` Paul Pluzhnikov
2023-02-05 20:08 ` Florian Weimer
2023-02-05 21:51 ` Paul Pluzhnikov
2023-02-05 22:34 ` Florian Weimer
2023-02-05 22:55 ` Paul Pluzhnikov
2023-02-06 6:01 ` Florian Weimer
2023-02-06 16:25 ` Paul Pluzhnikov
2023-02-08 21:43 ` Paul Pluzhnikov
2023-01-25 20:50 ` Paul Pluzhnikov [this message]
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='CALoOobPD0pPxciksLtFfB_VGCS-oT_jm9wXzyfeY=sDFZesDeQ@mail.gmail.com' \
--to=ppluzhnikov@google.com \
--cc=dalias@libc.org \
--cc=fweimer@redhat.com \
--cc=jwakely@redhat.com \
--cc=libc-alpha@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).