Mercurial > hg > qcc
changeset 399:79cb0d585837
Fix from Dave Dodge: The problem is that tcc doesn't have any code to recognize
function pointers within a conditional expression, so it defaults to treating
them as integers. The resulting expression then has integer type,
which of course isn't valid for a function call. Here's a quick (but
somewhat incomplete) workaround.
author | landley@driftwood |
---|---|
date | Sun, 08 Oct 2006 01:06:44 -0400 |
parents | 5ca71a951aa0 |
children | afda44bbf76b |
files | tcc.c |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/tcc.c Sun Oct 08 01:04:58 2006 -0400 +++ b/tcc.c Sun Oct 08 01:06:44 2006 -0400 @@ -7769,6 +7769,9 @@ } 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;