public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/57889] New: Improvement: builtin to return a string from a type (type to string builtin)
@ 2013-07-12 13:57 yann at droneaud dot fr
2013-07-12 17:45 ` [Bug c/57889] " mpolacek at gcc dot gnu.org
0 siblings, 1 reply; 2+ messages in thread
From: yann at droneaud dot fr @ 2013-07-12 13:57 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57889
Bug ID: 57889
Summary: Improvement: builtin to return a string from a type
(type to string builtin)
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: enhancement
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: yann at droneaud dot fr
Hi,
It might be of interest to have a builtin to convert a type name to a string.
Given a type or a variable, the builtin would return the type of it as a
string.
It could be used to build debug messages:
#define ASSERT_NULL(p) do { \
if ((p) == NULL) \
printf("%s * %s == NULL\n", __builtin_typestringof(*p), #p); \
} while(0);
Regards.
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug c/57889] Improvement: builtin to return a string from a type (type to string builtin)
2013-07-12 13:57 [Bug c/57889] New: Improvement: builtin to return a string from a type (type to string builtin) yann at droneaud dot fr
@ 2013-07-12 17:45 ` mpolacek at gcc dot gnu.org
0 siblings, 0 replies; 2+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2013-07-12 17:45 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57889
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mpolacek at gcc dot gnu.org
--- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
__builtin_typename would be a better name I suspect.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-07-12 17:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-12 13:57 [Bug c/57889] New: Improvement: builtin to return a string from a type (type to string builtin) yann at droneaud dot fr
2013-07-12 17:45 ` [Bug c/57889] " mpolacek at gcc dot gnu.org
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).