From 0bea5c7f21dbff5cab3b28002b32d8a84365bb75 Mon Sep 17 00:00:00 2001 From: bellard Date: Sat, 28 Oct 2006 14:15:37 +0000 Subject: [PATCH] workaround for function pointers in conditional expressions (Dave Dodge) --- tcc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tcc.c b/tcc.c index 512c9e5f..2289c860 100644 --- a/tcc.c +++ b/tcc.c @@ -7799,6 +7799,9 @@ static void expr_eq(void) } else if (bt1 == VT_PTR || bt2 == VT_PTR) { /* XXX: test pointer compatibility */ type = type1; + } else if (bt1 == VT_FUNC || bt2 == VT_FUNC) { + /* XXX: test function pointer compatibility */ + type = type1; } else if (bt1 == VT_STRUCT || bt2 == VT_STRUCT) { /* XXX: test structure compatibility */ type = type1;