public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [committed] Use true/false instead of 1/0 in lvalue_p
@ 2016-09-16 10:25 Marek Polacek
  0 siblings, 0 replies; only message in thread
From: Marek Polacek @ 2016-09-16 10:25 UTC (permalink / raw)
  To: GCC Patches

lvalue_p returns bool but was using 0/1 as return values.

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

2016-09-16  Marek Polacek  <polacek@redhat.com>

	* c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.

diff --git gcc/c/c-typeck.c gcc/c/c-typeck.c
index 4dec397..059ad1f 100644
--- gcc/c/c-typeck.c
+++ gcc/c/c-typeck.c
@@ -4631,7 +4631,7 @@ lvalue_p (const_tree ref)
 
     case COMPOUND_LITERAL_EXPR:
     case STRING_CST:
-      return 1;
+      return true;
 
     case INDIRECT_REF:
     case ARRAY_REF:
@@ -4647,7 +4647,7 @@ lvalue_p (const_tree ref)
       return TREE_CODE (TREE_TYPE (ref)) == ARRAY_TYPE;
 
     default:
-      return 0;
+      return false;
     }
 }
 \f

	Marek

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-09-16 10:15 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-16 10:25 [committed] Use true/false instead of 1/0 in lvalue_p Marek Polacek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).