From 25a25c17652fe7d79edbbf064794fd151d73fc2b Mon Sep 17 00:00:00 2001 From: aoliva Date: Sun, 27 Feb 2000 07:57:29 +0000 Subject: [PATCH] * cpplib.h (enum file_change_code): Added rename_file. * cpplib.c (do_line): If a filename is given, set file_change to rename_file. (output_line_command): If file_change is rename_file, always output a # directive with the file name. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@32215 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 6 ++++++ gcc/cpplib.c | 4 +++- gcc/cpplib.h | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f11c447..2a4cb00 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,11 @@ 2000-02-27 Alexandre Oliva + * cpplib.h (enum file_change_code): Added rename_file. + * cpplib.c (do_line): If a filename is given, set file_change to + rename_file. + (output_line_command): If file_change is rename_file, always + output a # directive with the file name. + * cpplib.c (do_pragma): Accept #pragma without consecutive token. 2000-02-26 Mark Mitchell diff --git a/gcc/cpplib.c b/gcc/cpplib.c index 8c7c2ea..9f96297 100644 --- a/gcc/cpplib.c +++ b/gcc/cpplib.c @@ -965,7 +965,7 @@ output_line_command (pfile, file_change) CPP_ADJUST_WRITTEN (pfile, strlen (CPP_PWRITTEN (pfile))); quote_string (pfile, ip->nominal_fname); - if (file_change != same_file) + if (file_change != same_file && file_change != rename_file) { CPP_PUTC_Q (pfile, ' '); CPP_PUTC_Q (pfile, file_change == enter_file ? '1' : '2'); @@ -1358,6 +1358,8 @@ do_line (pfile, keyword) U_CHAR *end_name = CPP_PWRITTEN (pfile) - 1; int action_number = 0; + file_change = rename_file; + if (read_line_number (pfile, &action_number)) { if (CPP_PEDANTIC (pfile)) diff --git a/gcc/cpplib.h b/gcc/cpplib.h index 592093c..71726aa 100644 --- a/gcc/cpplib.h +++ b/gcc/cpplib.h @@ -699,7 +699,7 @@ extern void cpp_scan_buffer PARAMS ((cpp_reader *)); extern int check_macro_name PARAMS ((cpp_reader *, const U_CHAR *)); /* Last arg to output_line_command. */ -enum file_change_code {same_file, enter_file, leave_file}; +enum file_change_code {same_file, rename_file, enter_file, leave_file}; extern void output_line_command PARAMS ((cpp_reader *, enum file_change_code)); -- 2.7.4