This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] Remove redundant check in decl.c


The following patch removes a redundant check in decl.c introduced
by the fix for PR 18738:
(tag_code == enum_type) implies (tag_code != typename_type).

Bootstrapped and regtested on i686-pc-linux-gnu.
Preapproved in private mail by Mark.
Applied to mainline and 4.0 branch.

Regards,
Volker


2005-09-06  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>

	* decl.c (check_elaborated_type_specifier): Remove redundant check.

===================================================================
--- gcc/gcc/cp/decl.c	29 Aug 2005 14:08:26 -0000	1.1421
+++ gcc/gcc/cp/decl.c	5 Sep 2005 16:26:11 -0000
@@ -9146,8 +9146,7 @@ check_elaborated_type_specifier (enum ta
       return error_mark_node;
     }
   else if (TREE_CODE (type) != ENUMERAL_TYPE
-	   && tag_code == enum_type
-	   && tag_code != typename_type)
+	   && tag_code == enum_type)
     {
       error ("%qT referred to as enum", type);
       error ("%q+T has a previous declaration here", type);
===================================================================



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]