From 510096fc922ce82f494eae1770bcb88be78b7c4f Mon Sep 17 00:00:00 2001 From: Ali Gholami Rudi Date: Sat, 10 Jul 2010 13:20:59 +0430 Subject: [PATCH] ncc: fix & and * on functions --- ncc.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/ncc.c b/ncc.c index baca723..8814c31 100644 --- a/ncc.c +++ b/ncc.c @@ -758,8 +758,7 @@ static void readpre(void) struct type type; readpre(); ts_pop(&type); - if (!(type.flags & T_FUNC) && !type.ptr) - type.ptr++; + type.ptr++; ts_push(&type); o_addr(); return; @@ -769,10 +768,8 @@ static void readpre(void) readpre(); ts_pop(&t); array2ptr(&t); - if (!(t.flags & T_FUNC) || t.ptr > 0) { - t.ptr--; - o_deref(TYPE_BT(&t)); - } + t.ptr--; + o_deref(TYPE_BT(&t)); ts_push(&t); return; } -- 2.11.4.GIT