int flag_traditional;
-/* Nonzero means use the ISO C9x dialect of C. */
+/* Nonzero means use the ISO C99 dialect of C. */
-int flag_isoc9x = 0;
+int flag_isoc99 = 0;
/* Nonzero means that we have builtin functions, and main is an int */
recognize:
-std=iso9899:1990 same as -ansi
-std=iso9899:199409 ISO C as modified in amend. 1
- -std=iso9899:199x ISO C 9x
+ -std=iso9899:1999 ISO C 99
-std=c89 same as -std=iso9899:1990
- -std=c9x same as -std=iso9899:199x
+ -std=c99 same as -std=iso9899:1999
-std=gnu89 default, iso9899:1990 + gnu extensions
- -std=gnu9x iso9899:199x + gnu extensions
+ -std=gnu99 iso9899:1999 + gnu extensions
*/
const char *argstart = &p[5];
flag_writable_strings = 0;
flag_no_asm = 1;
flag_no_nonansi_builtin = 1;
- flag_isoc9x = 0;
+ flag_isoc99 = 0;
}
else if (!strcmp (argstart, "iso9899:199409"))
{
goto iso_1990;
}
else if (!strcmp (argstart, "iso9899:199x")
- || !strcmp (argstart, "c9x"))
+ || !strcmp (argstart, "iso9899:1999")
+ || !strcmp (argstart, "c9x")
+ || !strcmp (argstart, "c99"))
{
flag_traditional = 0;
flag_writable_strings = 0;
flag_no_asm = 1;
flag_no_nonansi_builtin = 1;
- flag_isoc9x = 1;
+ flag_isoc99 = 1;
}
else if (!strcmp (argstart, "gnu89"))
{
flag_writable_strings = 0;
flag_no_asm = 0;
flag_no_nonansi_builtin = 0;
- flag_isoc9x = 0;
+ flag_isoc99 = 0;
}
- else if (!strcmp (argstart, "gnu9x"))
+ else if (!strcmp (argstart, "gnu9x") || !strcmp (argstart, "gnu99"))
{
flag_traditional = 0;
flag_writable_strings = 0;
flag_no_asm = 0;
flag_no_nonansi_builtin = 0;
- flag_isoc9x = 1;
+ flag_isoc99 = 1;
}
else
error ("unknown C standard `%s'", argstart);
&& ! (specbits & (1 << (int) RID_TYPEDEF) && initialized)
&& ! in_system_header)
{
- /* Issue a warning if this is an ISO C 9x program or if -Wreturn-type
+ /* Issue a warning if this is an ISO C 99 program or if -Wreturn-type
and this is a function, or if -Wimplicit; prefer the former
warning since it is more explicit. */
if ((warn_implicit_int || warn_return_type) && funcdef_flag)
warn_about_return_type = 1;
- else if (warn_implicit_int || flag_isoc9x)
+ else if (warn_implicit_int || flag_isoc99)
warning ("type defaults to `int' in declaration of `%s'", name);
}
/* CPP Library.
- Copyright (C) 1986, 87, 89, 92-98, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1986, 87, 89, 92-98, 1999, 2000 Free Software Foundation, Inc.
Contributed by Per Bothner, 1994-95.
Based on CCCP program by Paul Rubin, June 1986
Adapted to ANSI C, Richard Stallman, Jan 1987
case 'l':
if (! strcmp (argv[i], "-lang-c"))
opts->cplusplus = 0, opts->cplusplus_comments = 1, opts->c89 = 0,
- opts->c9x = 1, opts->objc = 0;
+ opts->c99 = 1, opts->objc = 0;
if (! strcmp (argv[i], "-lang-c89"))
{
opts->cplusplus = 0, opts->cplusplus_comments = 0;
- opts->c89 = 1, opts->c9x = 0, opts->objc = 0;
+ opts->c89 = 1, opts->c99 = 0, opts->objc = 0;
opts->trigraphs = 1;
new_pending_define (opts, "__STRICT_ANSI__");
}
if (! strcmp (argv[i], "-lang-c++"))
opts->cplusplus = 1, opts->cplusplus_comments = 1, opts->c89 = 0,
- opts->c9x = 0, opts->objc = 0;
+ opts->c99 = 0, opts->objc = 0;
if (! strcmp (argv[i], "-lang-objc"))
opts->cplusplus = 0, opts->cplusplus_comments = 1, opts->c89 = 0,
- opts->c9x = 0, opts->objc = 1;
+ opts->c99 = 0, opts->objc = 1;
if (! strcmp (argv[i], "-lang-objc++"))
opts->cplusplus = 1, opts->cplusplus_comments = 1, opts->c89 = 0,
- opts->c9x = 0, opts->objc = 1;
+ opts->c99 = 0, opts->objc = 1;
if (! strcmp (argv[i], "-lang-asm"))
opts->lang_asm = 1;
if (! strcmp (argv[i], "-lang-fortran"))
if (!strcmp (argv[i], "-std=gnu89"))
{
opts->cplusplus = 0, opts->cplusplus_comments = 1;
- opts->c89 = 1, opts->c9x = 0, opts->objc = 0;
+ opts->c89 = 1, opts->c99 = 0, opts->objc = 0;
}
- else if (!strcmp (argv[i], "-std=gnu9x"))
+ else if (!strcmp (argv[i], "-std=gnu9x")
+ || !strcmp (argv[i], "-std=gnu99"))
{
opts->cplusplus = 0, opts->cplusplus_comments = 1;
- opts->c89 = 0, opts->c9x = 1, opts->objc = 0;
+ opts->c89 = 0, opts->c99 = 1, opts->objc = 0;
new_pending_define (opts, "__STDC_VERSION__=199901L");
}
else if (!strcmp (argv[i], "-std=iso9899:1990")
|| !strcmp (argv[i], "-std=c89"))
{
opts->cplusplus = 0, opts->cplusplus_comments = 0;
- opts->c89 = 1, opts->c9x = 0, opts->objc = 0;
+ opts->c89 = 1, opts->c99 = 0, opts->objc = 0;
opts->trigraphs = 1;
new_pending_define (opts, "__STRICT_ANSI__");
}
else if (!strcmp (argv[i], "-std=iso9899:199409"))
{
opts->cplusplus = 0, opts->cplusplus_comments = 0;
- opts->c89 = 1, opts->c9x = 0, opts->objc = 0;
+ opts->c89 = 1, opts->c99 = 0, opts->objc = 0;
opts->trigraphs = 1;
new_pending_define (opts, "__STRICT_ANSI__");
new_pending_define (opts, "__STDC_VERSION__=199409L");
|| !strcmp (argv[i], "-std=c99"))
{
opts->cplusplus = 0, opts->cplusplus_comments = 1;
- opts->c89 = 0, opts->c9x = 1, opts->objc = 0;
+ opts->c89 = 0, opts->c99 = 1, opts->objc = 0;
opts->trigraphs = 1;
new_pending_define (opts, "__STRICT_ANSI__");
new_pending_define (opts, "__STDC_VERSION__=199901L");
-lang-fortran Assume that the input sources are in Fortran\n\
-lang-chill Assume that the input sources are in Chill\n\
-std=<std name> Specify the conformance standard; one of:\n\
- gnu89, gnu9x, c89, c9x, iso9899:1990,\n\
- iso9899:199409, iso9899:199x\n\
+ gnu89, gnu99, c89, c99, iso9899:1990,\n\
+ iso9899:199409, iso9899:1999\n\
-+ Allow parsing of C++ style features\n\
-w Inhibit warning messages\n\
-Wtrigraphs Warn if trigraphs are encountered\n\