public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/53977] New: CPP: Support __func__/__FUNCTION__
@ 2012-07-16 7:49 burnus at gcc dot gnu.org
2012-07-16 7:50 ` [Bug fortran/53977] " burnus at gcc dot gnu.org
2012-07-16 8:14 ` burnus at gcc dot gnu.org
0 siblings, 2 replies; 3+ messages in thread
From: burnus at gcc dot gnu.org @ 2012-07-16 7:49 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53977
Bug #: 53977
Summary: CPP: Support __func__/__FUNCTION__
Classification: Unclassified
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: burnus@gcc.gnu.org
As requested at http://gcc.gnu.org/ml/fortran/2012-07/msg00054.html
It would be useful to provide the name of the current procedure when using -cpp
via __func__/__FUNCTION__.
>From the GCC's CPP manual:
"C99 introduces __func__, and GCC has provided __FUNCTION__ for a long time.
Both of these are strings containing the name of the current function (there
are slight semantic differences; see the GCC manual). Neither of them is a
macro; the preprocessor does not know the name of the current function. They
tend to be useful in conjunction with __FILE__ and __LINE__, though."
http://gcc.gnu.org/onlinedocs/cpp/Standard-Predefined-Macros.html
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug fortran/53977] CPP: Support __func__/__FUNCTION__
2012-07-16 7:49 [Bug fortran/53977] New: CPP: Support __func__/__FUNCTION__ burnus at gcc dot gnu.org
@ 2012-07-16 7:50 ` burnus at gcc dot gnu.org
2012-07-16 8:14 ` burnus at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: burnus at gcc dot gnu.org @ 2012-07-16 7:50 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53977
Tobias Burnus <burnus at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |burnus at gcc dot gnu.org
--- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-07-16 07:50:21 UTC ---
See also http://gcc.gnu.org/onlinedocs/gcc/Function-Names.html for how that's
implemented in C.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug fortran/53977] CPP: Support __func__/__FUNCTION__
2012-07-16 7:49 [Bug fortran/53977] New: CPP: Support __func__/__FUNCTION__ burnus at gcc dot gnu.org
2012-07-16 7:50 ` [Bug fortran/53977] " burnus at gcc dot gnu.org
@ 2012-07-16 8:14 ` burnus at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: burnus at gcc dot gnu.org @ 2012-07-16 8:14 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53977
--- Comment #2 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-07-16 08:14:15 UTC ---
A quick test of other Fortran compilers shows that this is not a widely
supported feature - none of the tried compilers supports it. In C, it falls
semantically into the preprocessor, even though it is implemented as compiler
feature.
In terms of the form, gcc's __FUNCTION__ looks much more like a CPP macro than
C99's __func__.
(As CPP is not a Fortran-tuned preprocessor, the semantic - when applied to
Fortran - is a bit unclear as are features like C99's __func__.)
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-07-16 8:14 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-16 7:49 [Bug fortran/53977] New: CPP: Support __func__/__FUNCTION__ burnus at gcc dot gnu.org
2012-07-16 7:50 ` [Bug fortran/53977] " burnus at gcc dot gnu.org
2012-07-16 8:14 ` burnus 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).