shithub: scc

Download patch

ref: e616dabd2cc1d69b5e6fb26ba8de7775c668d0ae
parent: ef6b767b7d3ea2088f8652fe5ea76117661edef0
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Sat Jan 9 16:34:11 EST 2016

Do not use a reserved namespace

is* is a reserved namespace and it should not be used.

--- a/cc1/expr.c
+++ b/cc1/expr.c
@@ -128,7 +128,7 @@
 }
 
 static int
-isnull(Node *np)
+null(Node *np)
 {
 	if (!np->constant || np->type != pvoidtype)
 		return 0;
@@ -170,9 +170,9 @@
 			 * If we have a null pointer constant then
 			 * convert to the another type
 			 */
-			if (isnull(yes))
+			if (null(yes))
 				yes = convert(yes, no->type, 0);
-			if (isnull(no))
+			if (null(no))
 				no = convert(no, yes->type, 0);
 
 			if (!eqtype(yes->type, no->type))