tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Tinycc-devel] Re: Can not work on the typeof a extern varaible


From: Hanzac Chen
Subject: [Tinycc-devel] Re: Can not work on the typeof a extern varaible
Date: Fri, 22 May 2009 17:14:44 +0800

Hi again,

I've fixed this issue. This is because tcc uses all the type information of the referenced variable including extern, static, const, ...

Here is the patch for it (against the latest cvs).

On Thu, Apr 30, 2009 at 1:29 PM, Hanzac Chen <address@hidden> wrote:
Hi,

It reports an error when using typeof keyword on a extern variable.
e.g.
#include <stdio.h>

extern int a;

int main(void)
{
    __typeof__(a) b = 0;
   
    printf("%d\n", b);
    return 0;
}

The output:
C:\tcc>tcc -c test_typeof.c
test_typeof.c:7: ';' expected

while gcc can compile this file.

Regards,
Hanzac

Attachment: tccgen.c.patch
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]