diff options
author | loewis <loewis@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-09-23 22:20:08 +0000 |
---|---|---|
committer | loewis <loewis@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-09-23 22:20:08 +0000 |
commit | ad46fc6a7da5f562b7d8b37cc27c138f87081cfc (patch) | |
tree | 292010c5b05c2ec278045555e6ffa31ba22289a1 /gcc/cp/ptree.c | |
parent | 8654acdeacb0e89422e4a84d73f133fdd935a164 (diff) | |
download | gcc-ad46fc6a7da5f562b7d8b37cc27c138f87081cfc.tar.gz |
* cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): New macro.
(RECORD_OR_UNION_TYPE_CHECK, LANG_IDENTIFIER_CAST): Likewise.
(DEFARG_NODE_CHECK): Remove; replace with DEFAULT_ARG_CHECK.
* cp-tree.h: Add tree checking macros to various tree access
macros.
* ptree.c (print_lang_decl): Test for function or variable
before accessing template info.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@29642 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/ptree.c')
-rw-r--r-- | gcc/cp/ptree.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/cp/ptree.c b/gcc/cp/ptree.c index 0f7a7cba9b1..bbd0f996444 100644 --- a/gcc/cp/ptree.c +++ b/gcc/cp/ptree.c @@ -60,7 +60,8 @@ print_lang_decl (file, node, indent) fprintf (file, " sorted-fields "); fprintf (file, HOST_PTR_PRINTF, DECL_SORTED_FIELDS (node)); } - if (DECL_TEMPLATE_INFO (node)) + if ((TREE_CODE (node) == FUNCTION_DECL || TREE_CODE (node) == VAR_DECL) + && DECL_TEMPLATE_INFO (node)) { fprintf (file, " template-info "); fprintf (file, HOST_PTR_PRINTF, DECL_TEMPLATE_INFO (node)); |