J
jacob navia
Due to popular demand, I have prepared a ANSI-C-90 version of lcc-win.
This version has none of C99 since it is a backup version of lcc-win
from September 1999. The new C standard was just out, or was going
to get out, so lcc-win was at the then current standard level 1989.
Usage:
lc -ansic90 foo.c
The "driver" lc.exe will call lcc90.exe with the appropiate
options.
Note that the latest download of lcc-win has several new executables:
lcc90.exe C90 compiler
lcclnk90.exe linker
Note that there is no optimizer, no long longs, long doubles are
the same size of doubles, no extensions etc.
This compiler emits tons of warnings since for instance assignment of
an unsigned char * to a char * is not well seen...
The only thing that was already there is the _stdcall feature. This
feature will be recognized only at the *global* level, i.e. you can
write
int fn(void)
{
int _stdcall = 56;
}
Compilation of windows headers is problematic, probably because they use
anonymous unions, long long, and other goodies.
This version is not a toy compiler however. It is able to compile
itself, and the resulting executable has 30-40% of the speed of
a program compiled with the C99 version of lcc-win.
The library used is CRTDLL.DLL, what implies that there is a C90
printf, and all other functions of the C90 standard library.
This means also that programs link with a dynamic library and
are therefore smaller than equivalent programs with lcc-win.
(Several dozen Kb)
This version has none of C99 since it is a backup version of lcc-win
from September 1999. The new C standard was just out, or was going
to get out, so lcc-win was at the then current standard level 1989.
Usage:
lc -ansic90 foo.c
The "driver" lc.exe will call lcc90.exe with the appropiate
options.
Note that the latest download of lcc-win has several new executables:
lcc90.exe C90 compiler
lcclnk90.exe linker
Note that there is no optimizer, no long longs, long doubles are
the same size of doubles, no extensions etc.
This compiler emits tons of warnings since for instance assignment of
an unsigned char * to a char * is not well seen...
The only thing that was already there is the _stdcall feature. This
feature will be recognized only at the *global* level, i.e. you can
write
int fn(void)
{
int _stdcall = 56;
}
Compilation of windows headers is problematic, probably because they use
anonymous unions, long long, and other goodies.
This version is not a toy compiler however. It is able to compile
itself, and the resulting executable has 30-40% of the speed of
a program compiled with the C99 version of lcc-win.
The library used is CRTDLL.DLL, what implies that there is a C90
printf, and all other functions of the C90 standard library.
This means also that programs link with a dynamic library and
are therefore smaller than equivalent programs with lcc-win.
(Several dozen Kb)