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]

[C, committed] Minor cleanup in grokfield


No need to use a dedicated variable if we can use RECORD_OR_UNION_TYPE_P
directly and only once.

Bootstrapped/regtested on x86_64-linux, applying to trunk.

2017-07-25  Marek Polacek  <polacek@redhat.com>

	* c-decl.c (grokfield): Remove local variable.

diff --git gcc/c/c-decl.c gcc/c/c-decl.c
index 50da185e363..12fbc18bb94 100644
--- gcc/c/c-decl.c
+++ gcc/c/c-decl.c
@@ -7559,10 +7559,9 @@ grokfield (location_t loc,
 	 that took root before someone noticed the bug...  */
 
       tree type = declspecs->type;
-      bool type_ok = RECORD_OR_UNION_TYPE_P (type);
       bool ok = false;
 
-      if (type_ok
+      if (RECORD_OR_UNION_TYPE_P (type)
 	  && (flag_ms_extensions
 	      || flag_plan9_extensions
 	      || !declspecs->typedef_p))

	Marek


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