diff options
author | amacleod <amacleod@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-06-16 12:36:14 +0000 |
---|---|---|
committer | amacleod <amacleod@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-06-16 12:36:14 +0000 |
commit | ae8eafe077976dc68bf29ce6c36df3b1e7525552 (patch) | |
tree | e0e3f9d3a47e23326ab99cbd617d3095ac001e55 /gcc/cp/error.c | |
parent | 8b74461cc1863b0bcd2e6c61b6c66ee61553b13e (diff) |
1998-06-16 Andrew MacLeod <amacleod@cygnus.com>
* decl.c (grokvardecl): Don't build external assembler names for
TYPENAMEs in other namespaces as there is no declarator.
* error.c (cp_file_of, cp_line_of): Don't extract file or line number
info from DECL_CONTEXT if it is NULL.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@20524 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/error.c')
-rw-r--r-- | gcc/cp/error.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/cp/error.c b/gcc/cp/error.c index 4862d64894c..d4dc054c970 100644 --- a/gcc/cp/error.c +++ b/gcc/cp/error.c @@ -1811,7 +1811,7 @@ char * cp_file_of (t) tree t; { - if (TREE_CODE (t) == PARM_DECL) + if (TREE_CODE (t) == PARM_DECL && DECL_CONTEXT (t)) return DECL_SOURCE_FILE (DECL_CONTEXT (t)); else if (TREE_CODE_CLASS (TREE_CODE (t)) == 't') return DECL_SOURCE_FILE (TYPE_MAIN_DECL (t)); @@ -1824,7 +1824,7 @@ cp_line_of (t) tree t; { int line = 0; - if (TREE_CODE (t) == PARM_DECL) + if (TREE_CODE (t) == PARM_DECL && DECL_CONTEXT (t)) line = DECL_SOURCE_LINE (DECL_CONTEXT (t)); if (TREE_CODE (t) == TYPE_DECL && DECL_ARTIFICIAL (t)) t = TREE_TYPE (t); |