Driver:
-- add an -std= option (for c99, gnu99, ms at least)
Refactoring:
- eliminate target_architecture.h and replace with stuff in lang_features.h
- redo storage classes: so we can separate real from declared storage class
+- create structures for variables and functions, removing the omnipotent declaration
Lexer:
- Add preprocessor code
} else if(strcmp(option, "pedantic") == 0) {
fprintf(stderr, "warning: ignoring gcc option '%s'\n", arg);
} else if(strncmp(option, "std=", 4) == 0) {
- fprintf(stderr, "warning: ignoring gcc option '%s'\n", arg);
+ if(strcmp(&option[4], "c99") == 0) {
+ c_mode = _C89|_C99;
+ } else if(strcmp(&option[4], "c89") == 0) {
+ c_mode = _C89;
+ } else if(strcmp(&option[4], "gnu99") == 0) {
+ c_mode = _C89|_C99|_GNUC;
+ } else if(strcmp(&option[4], "microsoft") == 0) {
+ c_mode = _C89|_C99|_MS;
+ } else
+ fprintf(stderr, "warning: ignoring gcc option '%s'\n", arg);
} else if (option[0] == '-') {
/* double dash option */
++option;