lang-specs.h (c++-cpp-output): Pass -fpreprocessed.
authorJason Merrill <jason@gcc.gnu.org>
Tue, 20 Jul 1999 19:53:38 +0000 (15:53 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Tue, 20 Jul 1999 19:53:38 +0000 (15:53 -0400)
commit66a6250faad336d0adda2b0b7ed412d634d1880f
tree7fb4578f40b67cbe01e6123f6a2be6b9152e074b
parent81f374ebfb60d4382ee618c45c2e4952d1fc2d8c
lang-specs.h (c++-cpp-output): Pass -fpreprocessed.

* lang-specs.h (c++-cpp-output): Pass -fpreprocessed.

* lex.c (token_getch, token_put_back): New fns.
(real_yylex): Use them.

* lex.c (lang_init): Generalize.
(lang_init_options): Tell cpplib this is C++.
(nextchar): Remove.  Replace uses with put_back.
(skip_white_space): Handle linemode here.  Optimize for cpplib.
(extend_token_buffer_to): New fn.
(extend_token_buffer): Use it.
(read_line_number, check_newline): Just deal with tokens.
(real_yylex): More cpplib optimizations.  Simplify.  Don't produce
EXTERN_LANG_STRING, LEFT_RIGHT or PAREN_STAR_PAREN here.
* spew.c (yylex): Produce LEFT_RIGHT and EXTERN_LANG_STRING.
* parse.y (PAREN_STAR_PAREN): Remove.
* input.c: Don't use the putback machinery with cpplib.
(sub_getch): Fold back into getch.
(getch): Don't handle linemode here.
(feed_input): Unget any text in the token buffer.

* lex.c (set_typedecl_interface_info, set_vardecl_interface_info,
nextyychar, nextyylval): Remove.

* lex.c (indent_level): New variable.
(init_parse): Set cpp_token to CPP_DIRECTIVE.
(consume_string): Make this smart about USE_CPPLIB.
(yyungetc): Use put_back function.
(pragma_getc, pragma_ungetc): Functions deleted.
(check_newline): Rewrite to be intelligent about USE_CPPLIB.
Also, call HANDLE_PRAGMA with getch, yyungetc, not pragma_getc and
pragma_ungetc.
(real_yylex): Rewrite to be intelligent about USE_CPPLIB.
Also, clean up cases where we redundantly set token_buffer[0].
(read_line_number): New fn.
* input.c (feed_input): Use integrated cpplib if USE_CPPLIB.
(end_input): Call cpp_pop_buffer if USE_CPPLIB.
(sub_getch): Conditionalize out code that's not appropriate if
USE_CPPLIB.
(put_back): Rewrite in case USE_CPPLIB is defined.
(input_redirected): Ditto.

From-SVN: r28193
gcc/cp/ChangeLog
gcc/cp/cp-tree.h
gcc/cp/input.c
gcc/cp/lang-specs.h
gcc/cp/lex.c
gcc/cp/parse.c
gcc/cp/parse.h
gcc/cp/parse.y
gcc/cp/spew.c