commit 78ca1ab63db47617702ebe635122fa8907fc95de
parent 22c9d2196d0be85579fd57745f9a398bb8f01df5
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date: Tue, 21 Feb 2017 17:08:45 +0100
[cc1] Fix pcompare() with NULL operands
Pcompare() was using eqtype() to see if the type of the operands
were compatible, but this is an error because a null pointer
can be compared to any pointer. For this reason the correct
code must use convert() which currently deals with all the
possible combinations
Diffstat:
1 file changed, 5 insertions(+), 0 deletions(-)
diff --git a/tests/execute/0115-null-comparision.c b/tests/execute/0115-null-comparision.c
@@ -0,0 +1,5 @@
+int
+main()
+{
+ return "abc" == (void *)0;
+}