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.