diff options
author | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-11-23 02:49:41 +0000 |
---|---|---|
committer | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-11-23 02:49:41 +0000 |
commit | b0944a40432646aef47109d5cf01e22512355f3e (patch) | |
tree | 226ba8a834310f6b3389722c4c998ad288f65546 /gcc/cp/cp-tree.def | |
parent | c90bf86c4c2d2f220539f0c8764c58ff8e15bbc5 (diff) | |
download | gcc-b0944a40432646aef47109d5cf01e22512355f3e.tar.gz |
* cp-tree.def (FUNCTION_NAME): New tree node.
* cp-tree.h (current_function_name_declared): Tweak documentation.
(lang_decl_flags): Add pretty_function_p, adjust dummy.
(DECL_PRETTY_FUNCTION_P): New macro.
* decl.c (cp_finish_decl): Handle declarations of __FUNCTION__,
etc., in a template function. Use at_function_scope_p instead of
expanding it inline.
* pt.c (tsubst_decl): Handle DECL_PRETTY_FUNCTION_P declarations
specially.
(tsubst): Handle FUNCTION_NAME.
(tsubst_copy): Likewise.
(instantiate_decl): Prevent redeclarations of __PRETTY_FUNCTION__,
etc. in instantiation.
* semantics.c (begin_compound_stmt): Declare __FUNCTION__, etc.,
even in template functions.
(setup_vtbl_ptr): Don't declare __PRETTY_FUNCTION in the
conditional scope at the top of a destructor.
* error.c (dump_function_decl): Use `[ with ... ]' syntax for
specializations too.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@30625 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/cp-tree.def')
-rw-r--r-- | gcc/cp/cp-tree.def | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/cp/cp-tree.def b/gcc/cp/cp-tree.def index d8eb62f65a5..de874cbd87a 100644 --- a/gcc/cp/cp-tree.def +++ b/gcc/cp/cp-tree.def @@ -200,6 +200,9 @@ DEFTREECODE (SRCLOC, "srcloc", 'x', 2) unused. */ DEFTREECODE (LOOKUP_EXPR, "lookup_expr", 'e', 1) +/* Used to represent __PRETTY_FUNCTION__ in template bodies. */ +DEFTREECODE (FUNCTION_NAME, "function_name", 'e', 0) + /* A whole bunch of tree codes for the initial, superficial parsing of templates. */ DEFTREECODE (MODOP_EXPR, "modop_expr", 'e', 3) |