summaryrefslogtreecommitdiff
path: root/gcc/cp/pt.c
diff options
context:
space:
mode:
authormmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>2004-02-03 16:53:27 +0000
committermmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>2004-02-03 16:53:27 +0000
commit2c584053e7a50135ab299115a5d7b909bd65355f (patch)
treeaad012333fc4dc0d216db7ad633eef56c2ea58ea /gcc/cp/pt.c
parentce0713c7a0ec55b28fa098bfc17c772fc537f5e9 (diff)
downloadgcc-2c584053e7a50135ab299115a5d7b909bd65355f.tar.gz
PR c++/13975
* tree.h (enum tree_index): Add TI_PUBLIC, TI_PROTECTED, and TI_PRIVATE. (access_public_node): Redefine. (access_protected_node): Likewise. (access_private_node): Likewise. * tree.c (build_common_tree_nodes): Create access_public_node, access_protected_node, and access_private_node. PR c++/13978 * pt.c (build_non_dependent_expr): Do not build NON_DEPENDENT_EXPRs for FUNCTION_DECLs or TEMPLATE_DECLs. PR c++/13968 * semantics.c (finish_id_expression): Do not return an IDENTIFIER_NODE when lookup finds a VAR_DECL. PR c++/13975 * parser.c (cp_parser_simple_declaration): When skipping to the end of the statement swallow the terminating semicolon. PR c++/13978 * g++.dg/template/koenig4.C: New test. PR c++/13968 * g++.dg/template/crash17.C: New test. PR c++/13975 * g++.dg/parse/error13.C: New test. * g++.old-deja/g++.robertl/eb125.C: Tweak error messages. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@77176 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/pt.c')
-rw-r--r--gcc/cp/pt.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index f0350423e7c..b8a02fbe47e 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -12027,7 +12027,9 @@ build_non_dependent_expr (tree expr)
return expr;
/* Preserve OVERLOADs; the functions must be available to resolve
types. */
- if (TREE_CODE (expr) == OVERLOAD)
+ if (TREE_CODE (expr) == OVERLOAD
+ || TREE_CODE (expr) == FUNCTION_DECL
+ || TREE_CODE (expr) == TEMPLATE_DECL)
return expr;
/* Preserve string constants; conversions from string constants to
"char *" are allowed, even though normally a "const char *"