Commit c2aa34b5 by Nathan Sidwell Committed by Nathan Sidwell

[C++ PATCH] remove unreachable code

https://gcc.gnu.org/ml/gcc-patches/2019-05/msg00039.html
	* semantics.c (finish_id_expression_1): Remove unreachable code.

From-SVN: r270792
parent c2799854
2019-05-02 Nathan Sidwell <nathan@acm.org>
* semantics.c (finish_id_expression_1): Remove unreachable code.
2019-05-01 Nathan Sidwell <nathan@acm.org> 2019-05-01 Nathan Sidwell <nathan@acm.org>
* name-lookup.h (get_class_binding_direct): Change final arg to * name-lookup.h (get_class_binding_direct): Change final arg to
......
...@@ -3740,17 +3740,13 @@ finish_id_expression_1 (tree id_expression, ...@@ -3740,17 +3740,13 @@ finish_id_expression_1 (tree id_expression,
wrong, so just return the identifier. */ wrong, so just return the identifier. */
return id_expression; return id_expression;
if (TREE_CODE (decl) == NAMESPACE_DECL) if (DECL_CLASS_TEMPLATE_P (decl))
{
error ("use of namespace %qD as expression", decl);
return error_mark_node;
}
else if (DECL_CLASS_TEMPLATE_P (decl))
{ {
error ("use of class template %qT as expression", decl); error ("use of class template %qT as expression", decl);
return error_mark_node; return error_mark_node;
} }
else if (TREE_CODE (decl) == TREE_LIST)
if (TREE_CODE (decl) == TREE_LIST)
{ {
/* Ambiguous reference to base members. */ /* Ambiguous reference to base members. */
error ("request for member %qD is ambiguous in " error ("request for member %qD is ambiguous in "
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment