On Sat, May 06, 2017 at 08:54:45PM -0700, Larry Doolittle wrote:
> I just made a quick attempt to build gcc-4.7.4 with current git tcc.
> It made it through about 337 compiles before failing on
> ../.././gcc/c-family/c-opts.c:141: error: ';' expected (got "=")
Removing the bogus "extern" in that line makes the build progress
quite far, enough to build and start running the first-stage gcc.
The build fault that eventually occurs looks like it has nothing to do
with tcc.
I'd leave tcc alone, and just patch that bogus gcc source.
The behavior difference between gcc and tcc simplifies to:
$ cat ext_init.c
extern const unsigned int c_family_lang_mask = 1;
$ gcc -c ext_init.c
ext_init.c:1:27: warning: ‘c_family_lang_mask’ initialized and declared ‘extern’
extern const unsigned int c_family_lang_mask = 1;
^
$ echo $?
0
$ tcc -c ext_init.c
ext_init.c:1: error: ';' expected (got "=")
$ echo $?
1
- Larry
_______________________________________________
Tinycc-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/tinycc-devel