aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Stallman <rms@gnu.org>1993-10-13 21:52:31 +0000
committerRichard Stallman <rms@gnu.org>1993-10-13 21:52:31 +0000
commit65715deac9bb944b40b8be17594e889b4f1e51cb (patch)
treed8f5f682ac51f592980ee456d3e4810ea315e99d /gcc
parentb57a5cd39d48f9e358ee0e42f6859684f463d71b (diff)
downloadgcc-65715deac9bb944b40b8be17594e889b4f1e51cb.zip
gcc-65715deac9bb944b40b8be17594e889b4f1e51cb.tar.gz
gcc-65715deac9bb944b40b8be17594e889b4f1e51cb.tar.bz2
(output_line_command): Output the `4' flag only if cplusplus.
(do_line): Handle the `4' flag. From-SVN: r5781
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cccp.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/gcc/cccp.c b/gcc/cccp.c
index 3648b92..aec4c79 100644
--- a/gcc/cccp.c
+++ b/gcc/cccp.c
@@ -5961,6 +5961,8 @@ do_line (buf, limit, op, keyword)
file_change = leave_file;
else if (*bp == '3')
ip->system_header_p = 1;
+ else if (*bp == '4')
+ ip->system_header_p = 2;
else {
error ("invalid format `#line' command");
return 0;
@@ -5973,6 +5975,11 @@ do_line (buf, limit, op, keyword)
bp++;
SKIP_WHITE_SPACE (bp);
}
+ if (*bp == '4') {
+ ip->system_header_p = 2;
+ bp++;
+ SKIP_WHITE_SPACE (bp);
+ }
if (*bp) {
error ("invalid format `#line' command");
return 0;
@@ -7108,7 +7115,7 @@ output_line_command (ip, op, conditional, file_change)
*line_end++ = '3';
}
/* Tell cc1plus if following text should be treated as C. */
- if (ip->system_header_p == 2) {
+ if (ip->system_header_p == 2 && cplusplus) {
*line_end++ = ' ';
*line_end++ = '4';
}