Description:
The lcc C Compiler and related topics.
|
|
|
Buffer overflows in C.
|
| |
Contrary to the opinion of many people, I am convinced that the problem in C is not the language itself, that I consider an excellent one, but the wrong use it is done of C by people that do not take care about the details and do not respect the rules of software engineering. I will use an example of badly written code to show several of the problems that arise when people... more »
|
|
Finding a bit-string in another bit-string
|
| |
Here is a function to do the equivalent of strstr with bitstrings. The basic ideas is to prepare a table of shifted patterns, and compare bytes instead of bits, what makes things faster and easier. I would like to thank Mr Morris Keesan and Mr Peter Nilsson of this discussion group for their help with the bit shifting.... more »
|
|
-nolibc problem
|
| |
Hello! Maybe I'am blind or stupid, but I've a problem... For a small program the user should simply provide a driveletter within the commandline. This looks like this: example.exe /drive:m I have used the wizard to generate a console-application, so I've got the wellknown "HandleOptions"- Code. Okay...... more »
|
|
?
|
| |
...inline div_t __declspec(naked) div(int a,int b) { _asm("\tmovl\t(%esp),%eax"); _asm("\tmovl\t4(%esp),%ecx"); _asm("\tcdq"); _asm("\tidivl\t%ecx"); ...div_t div(int _numer, int _denom); ...I like being away from the anal-retentive topic guards in clc. This comes from stdlib.h. What does it do?... more »
|
|
existence of a FAQ
|
| |
I just started into lcc and wonder if there is a FAQ list that I'm missing. The funny thing about posting to usenet is that sometimes the very act of doing it solves the problem. I was to explain how I had not encountered a FAQ yet then discovered lcc.chm in C:\lcc\lcc\doc. I hope this goes well for me. It's been a long time that I used a compiler... more »
|
|
ANN An ansic90 version of lcc-win
|
| |
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... more »
|
|
Does LCC build abstract syntax tree?
|
| |
I find a paper ([link] lean.pdf) that saying (on page 21) that one of mistakes is LCC doesn't have an AST. I am confused here - isn't the Tree struct defined in C.h the AST? There is no nodes in that tree build to represent none terminals, and it looks to me the exact kind of AST...... more »
|
|
Improvements to the checkoverflow option
|
| |
(1) I have modified the code generator to generate a jump to an error label if there is an overflow, instead of generating code to jump over error code if there is NO overflow. This reduces the overhead of overflow checking from 4% to almost zero (not measurable in my setup). (2) I have added a #pragma overflowcheck (On/Off)... more »
|
|
What's new in lcc-win
|
| |
What's new in the new version of lcc-win ------------------------------ ---------- August 24: Fixed problem reported by Colin Barker: long long subtraction in 32 bits. Fred J. Tydeman reported: > Code like: > double ulp2, res2; > res2 = 1.0 + ulp2 * 4.0; > res2 = ulp2 * 4.0 + 1.0;... more »
|
|
|