diff options
author | Richard Henderson <rth@gcc.gnu.org> | 1999-12-18 20:43:20 -0800 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 1999-12-18 20:43:20 -0800 |
commit | e05eb7616897fce02c5e04ccfb66bd6db102a1df (patch) | |
tree | 110f13c77f6674cc97a3a9f0523870730925bbe9 /gcc/cppinit.c | |
parent | 09fe1c496d81c3732f3bb99664e770255ffc0cc7 (diff) | |
download | gcc-e05eb7616897fce02c5e04ccfb66bd6db102a1df.zip gcc-e05eb7616897fce02c5e04ccfb66bd6db102a1df.tar.gz gcc-e05eb7616897fce02c5e04ccfb66bd6db102a1df.tar.bz2 |
cccp.c (main): Define __STDC_VERSION__ as necessary.
* cccp.c (main): Define __STDC_VERSION__ as necessary.
* cppinit.c (cpp_handle_option): Likewise.
* ginclude/stdarg.h (va_copy): Use __STDC_VERSION__ to
determine when to define.
From-SVN: r31022
Diffstat (limited to 'gcc/cppinit.c')
-rw-r--r-- | gcc/cppinit.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/gcc/cppinit.c b/gcc/cppinit.c index 3ffda8a..2bec845 100644 --- a/gcc/cppinit.c +++ b/gcc/cppinit.c @@ -1331,7 +1331,7 @@ cpp_handle_option (pfile, argc, argv) opts->cplusplus = 0, opts->cplusplus_comments = 0; opts->c89 = 1, opts->c9x = 0, opts->objc = 0; opts->trigraphs = 1; - new_pending_define (opts, "__STRICT_ANSI__=199000"); + new_pending_define (opts, "__STRICT_ANSI__"); } if (! strcmp (argv[i], "-lang-c++")) opts->cplusplus = 1, opts->cplusplus_comments = 1, opts->c89 = 0, @@ -1365,6 +1365,7 @@ cpp_handle_option (pfile, argc, argv) { opts->cplusplus = 0, opts->cplusplus_comments = 1; opts->c89 = 0, opts->c9x = 1, opts->objc = 0; + new_pending_define (opts, "__STDC_VERSION__=199901L"); } else if (!strcmp (argv[i], "-std=iso9899:1990") || !strcmp (argv[i], "-std=c89")) @@ -1372,14 +1373,15 @@ cpp_handle_option (pfile, argc, argv) opts->cplusplus = 0, opts->cplusplus_comments = 0; opts->c89 = 1, opts->c9x = 0, opts->objc = 0; opts->trigraphs = 1; - new_pending_define (opts, "__STRICT_ANSI__=199000"); + 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->trigraphs = 1; - new_pending_define (opts, "__STRICT_ANSI__=199409"); + new_pending_define (opts, "__STRICT_ANSI__"); + new_pending_define (opts, "__STDC_VERSION__=199409L"); } else if (!strcmp (argv[i], "-std=iso9899:199x") || !strcmp (argv[i], "-std=iso9899:1999") @@ -1389,7 +1391,8 @@ cpp_handle_option (pfile, argc, argv) opts->cplusplus = 0, opts->cplusplus_comments = 1; opts->c89 = 0, opts->c9x = 1, opts->objc = 0; opts->trigraphs = 1; - new_pending_define (opts, "__STRICT_ANSI__=199900"); + new_pending_define (opts, "__STRICT_ANSI__"); + new_pending_define (opts, "__STDC_VERSION__=199901L"); } break; |