Commit 6271b191 by Richard Henderson Committed by Richard Henderson

c-decl.c (flag_isoc9x): Default off.

        * c-decl.c (flag_isoc9x): Default off.
        (c_decode_option): Kill -std=gnu, add -std=gnu89 and -std=gnu9x.
        * cccp.c (print_help, main): Likewise.
        * gcc.c (default_compilers): Update for -std=gnu*.

From-SVN: r24186
parent f454109f
Tue Dec 8 10:23:52 1998 Richard Henderson <rth@cygnus.com>
* c-decl.c (flag_isoc9x): Default off.
(c_decode_option): Kill -std=gnu, add -std=gnu89 and -std=gnu9x.
* cccp.c (print_help, main): Likewise.
* gcc.c (default_compilers): Update for -std=gnu*.
Tue Dec 8 01:14:46 1998 Jeffrey A Law (law@cygnus.com) Tue Dec 8 01:14:46 1998 Jeffrey A Law (law@cygnus.com)
* Makefile.in (DEMANGLE_H): Change location to shared demangle.h. * Makefile.in (DEMANGLE_H): Change location to shared demangle.h.
......
...@@ -470,7 +470,7 @@ int flag_traditional; ...@@ -470,7 +470,7 @@ int flag_traditional;
/* Nonzero means use the ISO C9x dialect of C. */ /* Nonzero means use the ISO C9x dialect of C. */
int flag_isoc9x = 1; int flag_isoc9x = 0;
/* Nonzero means that we have builtin functions, and main is an int */ /* Nonzero means that we have builtin functions, and main is an int */
...@@ -657,11 +657,12 @@ c_decode_option (argc, argv) ...@@ -657,11 +657,12 @@ c_decode_option (argc, argv)
/* Select the appropriate language standard. We currently /* Select the appropriate language standard. We currently
recognize: recognize:
-std=iso9899:1990 same as -ansi -std=iso9899:1990 same as -ansi
-std=gnu default
-std=iso9899:199409 ISO C as modified in amend. 1 -std=iso9899:199409 ISO C as modified in amend. 1
-std=iso9899:199x ISO C 9x -std=iso9899:199x ISO C 9x
-std=c89 same as -std=iso9899:1990 -std=c89 same as -std=iso9899:1990
-std=c9x same as -std=iso9899:199x -std=c9x same as -std=iso9899:199x
-std=gnu89 default, iso9899:1990 + gnu extensions
-std=gnu9x iso9899:199x + gnu extensions
*/ */
const char *argstart = &p[5]; const char *argstart = &p[5];
...@@ -689,7 +690,15 @@ c_decode_option (argc, argv) ...@@ -689,7 +690,15 @@ c_decode_option (argc, argv)
flag_no_nonansi_builtin = 1; flag_no_nonansi_builtin = 1;
flag_isoc9x = 1; flag_isoc9x = 1;
} }
else if (!strcmp (argstart, "gnu")) else if (!strcmp (argstart, "gnu89"))
{
flag_traditional = 0;
flag_writable_strings = 0;
flag_no_asm = 0;
flag_no_nonansi_builtin = 0;
flag_isoc9x = 0;
}
else if (!strcmp (argstart, "gnu9x"))
{ {
flag_traditional = 0; flag_traditional = 0;
flag_writable_strings = 0; flag_writable_strings = 0;
......
...@@ -1176,7 +1176,7 @@ print_help () ...@@ -1176,7 +1176,7 @@ print_help ()
printf (" -lang-asm Assume that the input sources are in assembler\n"); printf (" -lang-asm Assume that the input sources are in assembler\n");
printf (" -lang-chill Assume that the input sources are in Chill\n"); printf (" -lang-chill Assume that the input sources are in Chill\n");
printf (" -std=<std name> Specify the conformance standard; one of:\n"); printf (" -std=<std name> Specify the conformance standard; one of:\n");
printf (" gnu, c89, c9x, iso9899:1990,\n"); printf (" gnu89, gnu9x, c89, c9x, iso9899:1990,\n");
printf (" iso9899:199409, iso9899:199x\n"); printf (" iso9899:199409, iso9899:199x\n");
printf (" -+ Allow parsing of C++ style features\n"); printf (" -+ Allow parsing of C++ style features\n");
printf (" -w Inhibit warning messages\n"); printf (" -w Inhibit warning messages\n");
...@@ -1498,11 +1498,12 @@ main (argc, argv) ...@@ -1498,11 +1498,12 @@ main (argc, argv)
case 's': case 's':
if (!strcmp (argv[i], "-std=iso9899:1990") if (!strcmp (argv[i], "-std=iso9899:1990")
|| !strcmp (argv[i], "-std=iso9899:199409") || !strcmp (argv[i], "-std=iso9899:199409")
|| !strcmp (argv[i], "-std=c89")) || !strcmp (argv[i], "-std=c89")
|| !strcmp (argv[i], "-std=gnu89"))
cplusplus = 0, cplusplus_comments = 0, c89 = 1, c9x = 0, objc = 0; cplusplus = 0, cplusplus_comments = 0, c89 = 1, c9x = 0, objc = 0;
else if (!strcmp (argv[i], "-std=iso9899:199x") else if (!strcmp (argv[i], "-std=iso9899:199x")
|| !strcmp (argv[i], "-std=c9x") || !strcmp (argv[i], "-std=c9x")
|| !strcmp (argv[i], "-std=gnu")) || !strcmp (argv[i], "-std=gnu9x"))
cplusplus = 0, cplusplus_comments = 1, c89 = 0, c9x = 1, objc = 0; cplusplus = 0, cplusplus_comments = 1, c89 = 0, c9x = 1, objc = 0;
break; break;
......
...@@ -586,8 +586,8 @@ static struct compiler default_compilers[] = ...@@ -586,8 +586,8 @@ static struct compiler default_compilers[] =
%{C:%{!E:%eGNU C does not support -C without using -E}}\ %{C:%{!E:%eGNU C does not support -C without using -E}}\
%{M} %{MM} %{MD:-MD %b.d} %{MMD:-MMD %b.d} %{MG}\ %{M} %{MM} %{MD:-MD %b.d} %{MMD:-MMD %b.d} %{MG}\
-undef -D__GNUC__=%v1 -D__GNUC_MINOR__=%v2\ -undef -D__GNUC__=%v1 -D__GNUC_MINOR__=%v2\
%{ansi|std=*:%{!std=gnu:-trigraphs -D__STRICT_ANSI__}}\ %{ansi|std=*:%{!std=gnu*:-trigraphs -D__STRICT_ANSI__}}\
%{!undef:%{!ansi:%{!std=*:%p}%{std=gnu:%p}} %P} %{trigraphs}\ %{!undef:%{!ansi:%{!std=*:%p}%{std=gnu*:%p}} %P} %{trigraphs}\
%c %{Os:-D__OPTIMIZE_SIZE__} %{O*:%{!O0:-D__OPTIMIZE__}}\ %c %{Os:-D__OPTIMIZE_SIZE__} %{O*:%{!O0:-D__OPTIMIZE__}}\
%{traditional} %{ftraditional:-traditional}\ %{traditional} %{ftraditional:-traditional}\
%{traditional-cpp:-traditional}\ %{traditional-cpp:-traditional}\
...@@ -599,8 +599,8 @@ static struct compiler default_compilers[] = ...@@ -599,8 +599,8 @@ static struct compiler default_compilers[] =
%{!Q:-quiet} -dumpbase %b.c %{d*} %{m*} %{a*}\ %{!Q:-quiet} -dumpbase %b.c %{d*} %{m*} %{a*}\
%{MD:-MD %b.d} %{MMD:-MMD %b.d} %{MG}\ %{MD:-MD %b.d} %{MMD:-MMD %b.d} %{MG}\
-undef -D__GNUC__=%v1 -D__GNUC_MINOR__=%v2\ -undef -D__GNUC__=%v1 -D__GNUC_MINOR__=%v2\
%{ansi|std=*:%{!std=gnu:-trigraphs -D__STRICT_ANSI__}}\ %{ansi|std=*:%{!std=gnu*:-trigraphs -D__STRICT_ANSI__}}\
%{!undef:%{!ansi:%{!std=*:%p}%{std=gnu:%p}} %P} %{trigraphs}\ %{!undef:%{!ansi:%{!std=*:%p}%{std=gnu*:%p}} %P} %{trigraphs}\
%c %{Os:-D__OPTIMIZE_SIZE__} %{O*:%{!O0:-D__OPTIMIZE__}}\ %c %{Os:-D__OPTIMIZE_SIZE__} %{O*:%{!O0:-D__OPTIMIZE__}}\
%{H} %C %{D*} %{U*} %{i*} %Z\ %{H} %C %{D*} %{U*} %{i*} %Z\
%{ftraditional:-traditional}\ %{ftraditional:-traditional}\
...@@ -621,8 +621,8 @@ static struct compiler default_compilers[] = ...@@ -621,8 +621,8 @@ static struct compiler default_compilers[] =
%{C:%{!E:%eGNU C does not support -C without using -E}}\ %{C:%{!E:%eGNU C does not support -C without using -E}}\
%{M} %{MM} %{MD:-MD %b.d} %{MMD:-MMD %b.d} %{MG}\ %{M} %{MM} %{MD:-MD %b.d} %{MMD:-MMD %b.d} %{MG}\
-undef -D__GNUC__=%v1 -D__GNUC_MINOR__=%v2\ -undef -D__GNUC__=%v1 -D__GNUC_MINOR__=%v2\
%{ansi|std=*:%{!std=gnu:-trigraphs -D__STRICT_ANSI__}}\ %{ansi|std=*:%{!std=gnu*:-trigraphs -D__STRICT_ANSI__}}\
%{!undef:%{!ansi:%{!std=*:%p}%{std=gnu:%p}} %P} %{trigraphs}\ %{!undef:%{!ansi:%{!std=*:%p}%{std=gnu*:%p}} %P} %{trigraphs}\
%c %{Os:-D__OPTIMIZE_SIZE__} %{O*:%{!O0:-D__OPTIMIZE__}}\ %c %{Os:-D__OPTIMIZE_SIZE__} %{O*:%{!O0:-D__OPTIMIZE__}}\
%{traditional} %{ftraditional:-traditional}\ %{traditional} %{ftraditional:-traditional}\
%{traditional-cpp:-traditional}\ %{traditional-cpp:-traditional}\
...@@ -648,8 +648,8 @@ static struct compiler default_compilers[] = ...@@ -648,8 +648,8 @@ static struct compiler default_compilers[] =
%{C:%{!E:%eGNU C does not support -C without using -E}}\ %{C:%{!E:%eGNU C does not support -C without using -E}}\
%{M} %{MM} %{MD:-MD %b.d} %{MMD:-MMD %b.d} %{MG}\ %{M} %{MM} %{MD:-MD %b.d} %{MMD:-MMD %b.d} %{MG}\
-undef -D__GNUC__=%v1 -D__GNUC_MINOR__=%v2\ -undef -D__GNUC__=%v1 -D__GNUC_MINOR__=%v2\
%{ansi|std=*:%{!std=gnu:-trigraphs -D__STRICT_ANSI__}}\ %{ansi|std=*:%{!std=gnu*:-trigraphs -D__STRICT_ANSI__}}\
%{!undef:%{!ansi:%{!std=*:%p}%{std=gnu:%p}} %P} %{trigraphs}\ %{!undef:%{!ansi:%{!std=*:%p}%{std=gnu*:%p}} %P} %{trigraphs}\
%c %{Os:-D__OPTIMIZE_SIZE__} %{O*:%{!O0:-D__OPTIMIZE__}}\ %c %{Os:-D__OPTIMIZE_SIZE__} %{O*:%{!O0:-D__OPTIMIZE__}}\
%{traditional} %{ftraditional:-traditional}\ %{traditional} %{ftraditional:-traditional}\
%{traditional-cpp:-traditional}\ %{traditional-cpp:-traditional}\
...@@ -664,8 +664,8 @@ static struct compiler default_compilers[] = ...@@ -664,8 +664,8 @@ static struct compiler default_compilers[] =
%{C:%{!E:%eGNU C does not support -C without using -E}}\ %{C:%{!E:%eGNU C does not support -C without using -E}}\
%{M} %{MM} %{MD:-MD %b.d} %{MMD:-MMD %b.d} %{MG}\ %{M} %{MM} %{MD:-MD %b.d} %{MMD:-MMD %b.d} %{MG}\
-undef -D__GNUC__=%v1 -D__GNUC_MINOR__=%v2\ -undef -D__GNUC__=%v1 -D__GNUC_MINOR__=%v2\
%{std=*:%{!std=gnu:-trigraphs -D__STRICT_ANSI__}}\ %{std=*:%{!std=gnu*:-trigraphs -D__STRICT_ANSI__}}\
%{!undef:%{!std=*:%p}%{std=gnu:%p} %P} %{trigraphs}\ %{!undef:%{!std=*:%p}%{std=gnu*:%p} %P} %{trigraphs}\
%c %{Os:-D__OPTIMIZE_SIZE__} %{O*:%{!O0:-D__OPTIMIZE__}}\ %c %{Os:-D__OPTIMIZE_SIZE__} %{O*:%{!O0:-D__OPTIMIZE__}}\
%{traditional} %{ftraditional:-traditional}\ %{traditional} %{ftraditional:-traditional}\
%{traditional-cpp:-traditional}\ %{traditional-cpp:-traditional}\
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment