peter@sugar.UUCP (Peter da Silva) (01/07/88)
[ Referenced article discussed writing a 'C' inline preprocessor for a compilers course. Also discussed the problem of where to put statically allocated stuff. ] Sounds great. Most of it already exists (as I mentioned), but to make it hard enough to be interesting how about supporting casts to inline? We need an antonym of inline. How about called? As for the statically allocated stuff, that will require changing the compiler to track it and maintain references back to the real original code. The scoping rules for 'C' are overdue for review anyway. rand() { static int seed; /* statically allocated HERE */ ... } inline putchar(c) { ... } ... while((inline)rand()) { switch(foo) { case COMMON: putchar('\n'); break; case UNCOMMON1: (called)putchar('\r'); break; case UNCOMMON2: (called)putchar('\t'); break; ... } } while(index++<limit) putchar(' '); (inline)printf("---^ Syntax error\n"); /* error, because the code for printf is not available??? */ -- -- Peter da Silva `-_-' ...!hoptoad!academ!uhnix1!sugar!peter -- Disclaimer: These U aren't mere opinions... these are *values*.