- if (streq(&option[4], "c99")) {
- c_mode = _C89|_C99;
- } else if (streq(&option[4], "c89")) {
- c_mode = _C89;
- } else if (streq(&option[4], "gnu99")) {
- c_mode = _C89|_C99|_GNUC;
- } else if (streq(&option[4], "microsoft")) {
- c_mode = _C89|_C99|_MS;
- } else
- fprintf(stderr, "warning: ignoring gcc option '%s'\n", arg);
+ const char *const o = &option[4];
+ standard =
+ streq(o, "c++98") ? STANDARD_CXX98 :
+ streq(o, "c89") ? STANDARD_C89 :
+ streq(o, "c99") ? STANDARD_C99 :
+ streq(o, "c9x") ? STANDARD_C99 : // deprecated
+ streq(o, "gnu++98") ? STANDARD_GNUXX98 :
+ streq(o, "gnu89") ? STANDARD_GNU89 :
+ streq(o, "gnu99") ? STANDARD_GNU99 :
+ streq(o, "gnu9x") ? STANDARD_GNU99 : // deprecated
+ streq(o, "iso9899:1990") ? STANDARD_C89 :
+ streq(o, "iso9899:199409") ? STANDARD_C90 :
+ streq(o, "iso9899:1999") ? STANDARD_C99 :
+ streq(o, "iso9899:199x") ? STANDARD_C99 : // deprecated
+ (fprintf(stderr, "warning: ignoring gcc option '%s'\n", arg), standard);