This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[C, committed] Minor cleanup in grokfield
- From: Marek Polacek <polacek at redhat dot com>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 25 Jul 2017 13:54:25 +0200
- Subject: [C, committed] Minor cleanup in grokfield
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx04.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx04.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=polacek at redhat dot com
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 6B68A8047E
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