public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* C++RFC: Extending __builtin_FUNCTION
@ 2020-09-17 15:12 Nathan Sidwell
  0 siblings, 0 replies; only message in thread
From: Nathan Sidwell @ 2020-09-17 15:12 UTC (permalink / raw)
  To: GCC Patches

__builtin_FUNCTION () returns __FUNCTION__ of its invoker.


Any thoughts about extending it to provide:
a) the qualified name of the caller
b) the full signature of the invoker (__PRETTY_FUNCTION__)

we could do this with another __builtin, or permitting 
__builtin_FUNCTION to take an optional (or defaulted?) constant arg. 
Something like:
__builtin_FUNCTION () -> current behavior
__builtin_FUNCTION (0) -> as current
__builtin_FUNCTION (1) -> as qualified name
__builtin_FUNCTION (2) -> as __PRETTY_FUNCTION__

thoughts?

nathan

-- 
Nathan Sidwell

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-09-17 15:12 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-17 15:12 C++RFC: Extending __builtin_FUNCTION Nathan Sidwell

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).