13 Δεκ 2021, 13:02 Από [email protected]: > Single pass is not exactly what you think. The compiler passes over your > code once but it keeps track of various things for later resolution. > > For example, #define's are macros that are stored in some 'dictionary' to be > expanded when actually used, if ever. > > It's at the time they are used that they must resolve to something without > errors, not during definition. > Hmmmm. Sounds good at thinking but another thing I wonder is how is this approach is in action when trying to implement it as a developer. Not having macros and `#include` and stuff would probably be better. Instead we could have templates that have to be declared before used and then the compiler will see what it needs to generate and what it has already been created. Of course a function will be a little bit slower than a macro that will place the code in place but of course the difference is more tiny that TCC ;). `#if` is the only one that makes sense tbh but it needs to be more powerful of course.
_______________________________________________ Tinycc-devel mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/tinycc-devel
