diff options
author | Zack Weinberg <zack@wolery.cumb.org> | 2000-01-27 22:29:07 +0000 |
---|---|---|
committer | Zack Weinberg <zack@gcc.gnu.org> | 2000-01-27 22:29:07 +0000 |
commit | 75ec21db305f832534b2072c02a2a785c3cc0b4c (patch) | |
tree | 8fbdbe32865dcaea5f37fa4f80adc6849f91f96d /gcc/cppinit.c | |
parent | 73b5cdf98ad368b41766577395b2a5bbd91e3f1b (diff) | |
download | gcc-75ec21db305f832534b2072c02a2a785c3cc0b4c.zip gcc-75ec21db305f832534b2072c02a2a785c3cc0b4c.tar.gz gcc-75ec21db305f832534b2072c02a2a785c3cc0b4c.tar.bz2 |
cppinit.c (cpp_handle_option): Recognize C++ comments under -std=gnu89.
* cppinit.c (cpp_handle_option): Recognize C++ comments under
-std=gnu89.
* cpplib.c (skip_block_comment, skip_line_comment): Split code
out of...
(skip_comment) ... here. Permit C++ comments in system
headers always. Warn about C++ comments in user code under
-std=gnu89 -pedantic.
(copy_comment): Use skip_comment.
(cpp_skip_hspace, cpp_get_token): skip_comment can no longer
return EOF.
(consider_directive_while_skipping, do_else, do_endif): Call
validate_else unconditionally.
(validate_else): Check CPP_PEDANTIC here. Accept non-comment
text after the conditional in a system header.
* cpplib.h (struct cpp_buffer): Add flag
warned_cplusplus_comments.
From-SVN: r31654
Diffstat (limited to 'gcc/cppinit.c')
-rw-r--r-- | gcc/cppinit.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/cppinit.c b/gcc/cppinit.c index 6cb8e5c..2ee6e78 100644 --- a/gcc/cppinit.c +++ b/gcc/cppinit.c @@ -1345,7 +1345,7 @@ cpp_handle_option (pfile, argc, argv) case 's': if (!strcmp (argv[i], "-std=gnu89")) { - opts->cplusplus = 0, opts->cplusplus_comments = 0; + opts->cplusplus = 0, opts->cplusplus_comments = 1; opts->c89 = 1, opts->c9x = 0, opts->objc = 0; } else if (!strcmp (argv[i], "-std=gnu9x")) |