Liste des Groupes | Revenir à cl c |
I am working on a C backend that generates simple C code.If I try:
You can test it here:
http://thradams.com/cake/playground.html
Objective
- Shift all the complexity of the C compiler to the frontend.
Why? This approach simplifies having one frontend and multiple backends.
- Use C as an intermediate language to feed a backend (any C compiler can act as the backend).
The backend can then focus solely on code generation.
- Code is not portable
Removed C89 Features
- Preprocessor
- sizeof
- typedefYou can do that. But it can also slow down certain programs. (TCC 0.9.26 generated seqential tests for switch, but on one benchmark that relied on it heavily, its code was slower than my dynamic interpreter.)
- enum
- Constant expressions (the final result is precomputed during earlier stages)
- const
- I may also remove switch.
Les messages affichés proviennent d'usenet.