aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorAlexandre Oliva <oliva@lsd.ic.unicamp.br>2000-02-27 07:57:29 +0000
committerAlexandre Oliva <aoliva@gcc.gnu.org>2000-02-27 07:57:29 +0000
commit656ac1103948f17cf59c5ff0caef23e51ff47a38 (patch)
treeba356ab51b707985be58f6261c5d261a51ca066f /gcc
parent6aede5678763545abe158ca6000921015db57013 (diff)
downloadgcc-656ac1103948f17cf59c5ff0caef23e51ff47a38.zip
gcc-656ac1103948f17cf59c5ff0caef23e51ff47a38.tar.gz
gcc-656ac1103948f17cf59c5ff0caef23e51ff47a38.tar.bz2
cpplib.h (enum file_change_code): Added rename_file.
* 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. From-SVN: r32215
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/cpplib.c4
-rw-r--r--gcc/cpplib.h2
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 <oliva@lsd.ic.unicamp.br>
+ * 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 <mark@codesourcery.com>
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));