Bug 84915 - documentation: __FUNCTION__ is said by gcc-6 info to be a preprocessor macro
Summary: documentation: __FUNCTION__ is said by gcc-6 info to be a preprocessor macro
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: c (show other bugs)
Version: 6.4.1
: P3 normal
Target Milestone: 7.0
Assignee: Not yet assigned to anyone
URL: https://gcc.gnu.org/onlinedocs/gcc-7....
Keywords: documentation
Depends on:
Blocks:
 
Reported: 2018-03-16 20:12 UTC by Garreau, Alexandre
Modified: 2022-01-03 20:40 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Garreau, Alexandre 2018-03-16 20:12:58 UTC
(info "(gcc-6) Other Builtins") says __FUNCTION__ is a preprocessor macro, however, cpp info says it’s not. Am I missing something? do most cpp implementation parse C code and implement it as a macro so gcc claims it is while itself interprets it as not being one?

Look by yourselves:

 -- Built-in Function: const char * __builtin_FUNCTION ()
     This function is the equivalent to the preprocessor '__FUNCTION__'
     macro and returns the function name the invocation of the built-in
     is in.

It is not a bug of gcc but rather of its documentation, I don’t know if here is the right place to ask…
Comment 1 Andrew Pinski 2022-01-03 20:40:42 UTC
Fixed in GCC 7 by r7-549.