Richard Heathfield a écrit :
But according to you, it fails to diagnose BCPL-style comments, and
therefore is not conforming. Up until now, I thought your position
was that you were not interested in C90 conformance, so this comments
issue was irrelevant. Now it seems that you *are* claiming C90
conformance, in which case it becomes relevant.
F:\backups\oldversions\lcc90\test>type test.c
int main(void)
{
int inline = 10;
int restrict = 10;
int c = inline //* would anyone actually write this? */ restrict
;
printf("%d\n", c);
return 0;
}
F:\backups\oldversions\lcc90\test>..\lcc90 test.c
Chars read: 190,Total compilation time = 0.003 sec.
F:\backups\oldversions\lcc90\test>lcclnk test.obj
F:\backups\oldversions\lcc90\test>test
1
F:\backups\oldversions\lcc90\test>type t1.c
long long m;
// This is not a comment
F:\backups\oldversions\lcc90\test>..\lcc90 t1.c
Error t1.c 1 invalid use of `long'
Error t1.c 2 unrecognized declaration
Error t1.c 2 unrecognized declaration
Error t1.c 2 syntax error; found `is' expecting `;'
Error t1.c 2 syntax error; found `not' expecting `;'
Error t1.c 2 syntax error; found `a' expecting `;'
Error t1.c 2 syntax error; found `comment' expecting `;'
Error t1.c 2 syntax error; found `end of input' expecting `;'
Chars read: 40,Total compilation time = 0.003 sec.
8 errors, 0 warnings
F:\backups\oldversions\lcc90\test>
Everything is working as it should. I will update the driver, adding
a new flag (-ansic90) that, if given, will call lcc90 and link with the
old linker producing an executable 32 bits.
o No long long support (see above)
o no long double support, long double is just an alias for double
o no optimizer
o no support for anything that is not in C90: printf is a C90 printf,
all other functions are just C90
o no exception handling support.
Still, there is support for _stdcall. This is an implementation
reserved identifier so it doesn't really matter.
The headers are not compliant since there are probably some extra
functions in them. I will eliminate them as time permits.
It is not a toy however. It still compiles itself. Performance is
about 25-30% of that of lcc-win.