[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Tinycc-devel] tcc can't compile J
From: |
Robert Clausecker |
Subject: |
[Tinycc-devel] tcc can't compile J |
Date: |
Wed, 08 Aug 2012 18:51:08 +0200 |
Hello!
I tried to compile the J language environment[1] with tcc. It fails to
compile the file "p.c", on which gcc succeeds. I guess it has something
to do with preprocessor expansions. The offending code is in line 99:
PT cases[] = {
EDGE, VERB, NOUN, ANY, jtmonad, jtvmonad,
1,2,1,
EDGE+AVN, VERB, VERB, NOUN, jtmonad, jtvmonad,
2,3,2,
EDGE+AVN, NOUN, VERB, NOUN, jtdyad, jtvdyad,
1,3,2,
EDGE+AVN, VERB+NOUN, ADV, ANY, jtadv, jtvadv,
1,2,1,
EDGE+AVN, VERB+NOUN, CONJ, VERB+NOUN, jtconj, jtvconj,
1,3,1,
EDGE+AVN, VERB+NOUN, VERB, VERB, jttrident, jtvfolk,
1,3,1,
EDGE, CAVN, CAVN, ANY, jtbident, jtvhook,
1,2,1,
NAME+NOUN, ASGN, CAVN, APT cases[] = {
EDGE, VERB, NOUN, ANY, jtmonad, jtvmonad,
1,2,1,
EDGE+AVN, VERB, VERB, NOUN, jtmonad, jtvmonad,
2,3,2,
EDGE+AVN, NOUN, VERB, NOUN, jtdyad, jtvdyad,
1,3,2,
EDGE+AVN, VERB+NOUN, ADV, ANY, jtadv, jtvadv,
1,2,1,
EDGE+AVN, VERB+NOUN, CONJ, VERB+NOUN, jtconj, jtvconj,
1,3,1,
EDGE+AVN, VERB+NOUN, VERB, VERB, jttrident, jtvfolk,
1,3,1,
EDGE, CAVN, CAVN, ANY, jtbident, jtvhook,
1,2,1,
NAME+NOUN, ASGN, CAVN, ANY, jtis, jtvis,
0,2,1,
LPAR, CAVN, RPAR, ANY, jtpunc, jtvpunc,
0,2,0,
};NY, jtis, jtvis, 0,2,1,
LPAR, CAVN, RPAR, ANY, jtpunc, jtvpunc,
0,2,0,
};
(The second line is line 99). Using the preprocessor shipped with GCC,
this preprocesses to:
((I)4194304L +(I)2097152L +(I)67108864L), (I)262144L, (((I)1L
+(I)256L +(I)4L +(I)8L +(I)16L +(I)64L +(I)128L +(I)268435456L
+(I)536870912L +(I)1024L +(I)4096L +(I)8192L +(I)16384L)+((I)2L
+(I)131072L +(I)2048L)+(I)32L +(I)32768L +(I)65536L), -1L,
jtmonad, jtvmonad, 1,2,1,
I guess that there is some sort of bug in the preprocessor of tcc that
causes this behaviour. The error message is:
/home/fuz/src/J/p.c:99: error: ')' expected (got ",")
Thank you for fixing this bug in advantage!
Yours, Robert Clausecker
[1]: https://github.com/openj/core
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Tinycc-devel] tcc can't compile J,
Robert Clausecker <=