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 <[email protected]> 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 >
tccgen.c.patch
Description: Binary data
_______________________________________________ Tinycc-devel mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/tinycc-devel
