changeset 470:44036032a50a

Don't emit warning for boolean and/or between pointer and int.
author Rob Landley <rob@landley.net>
date Wed, 05 Sep 2007 00:06:26 -0500
parents bb13836ab658
children 46f5437276f3
files tcc.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/tcc.c	Tue Sep 04 23:51:37 2007 -0500
+++ b/tcc.c	Wed Sep 05 00:06:26 2007 -0500
@@ -4728,7 +4728,8 @@
     bt2 = type2->t & VT_BTYPE;
     /* accept comparison between pointer and integer with a warning */
     if ((is_integer_btype(bt1) || is_integer_btype(bt2)) && op != '-') {
-        warning("comparison between pointer and integer");
+        if (op != TOK_LOR && op != TOK_LAND )
+            warning("comparison between pointer and integer");
         return;
     }