aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorNeil Booth <neil@daikokuya.co.uk>2002-06-28 06:26:54 +0000
committerNeil Booth <neil@gcc.gnu.org>2002-06-28 06:26:54 +0000
commitd1a586888ec752c4a3e9aa322f2f8ebe1c6ff9c4 (patch)
treea7a80d0a2c536203d919b2a5eb3328aa0e029f54 /gcc
parent55c1c60d4fb961c1e895d53203b23c68f9744eb9 (diff)
downloadgcc-d1a586888ec752c4a3e9aa322f2f8ebe1c6ff9c4.zip
gcc-d1a586888ec752c4a3e9aa322f2f8ebe1c6ff9c4.tar.gz
gcc-d1a586888ec752c4a3e9aa322f2f8ebe1c6ff9c4.tar.bz2
re PR preprocessor/7138 (gcc-3.2 failed to compile kernel)
PR preprocessor/7138 * cpplib.c (_cpp_handle_directive): Do traditional preparation after setting state.angled_headers. * cpptrad.c (scan_out_logical_line): Fix potential quote bug. From-SVN: r55055
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog8
-rw-r--r--gcc/cpplib.c8
-rw-r--r--gcc/cpptrad.c5
3 files changed, 15 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index ab1a59b..42ac032 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,11 @@
+2002-06-28 Neil Booth <neil@daikokuya.co.uk>
+
+ PR preprocessor/7138
+ * cpplib.c (_cpp_handle_directive): Do traditional
+ preparation after setting state.angled_headers.
+ * cpptrad.c (scan_out_logical_line): Fix potential
+ quote bug.
+
2002-06-27 Aldy Hernandez <aldyh@redhat.com>
* config/rs6000/rs6000.c (rs6000_override_options): Move
diff --git a/gcc/cpplib.c b/gcc/cpplib.c
index 6bb9f4d..f2d33a8 100644
--- a/gcc/cpplib.c
+++ b/gcc/cpplib.c
@@ -388,10 +388,6 @@ _cpp_handle_directive (pfile, indented)
"style of line directive is a GCC extension");
}
- pfile->directive = dir;
- if (CPP_OPTION (pfile, traditional))
- prepare_directive_trad (pfile);
-
if (dir)
{
/* If we have a directive that is not an opening conditional,
@@ -442,6 +438,10 @@ _cpp_handle_directive (pfile, indented)
cpp_token_as_text (pfile, dname));
}
+ pfile->directive = dir;
+ if (CPP_OPTION (pfile, traditional))
+ prepare_directive_trad (pfile);
+
if (dir)
{
/* If we are processing a `#define' directive and we have been
diff --git a/gcc/cpptrad.c b/gcc/cpptrad.c
index 4d07d52..a72237b8 100644
--- a/gcc/cpptrad.c
+++ b/gcc/cpptrad.c
@@ -435,12 +435,13 @@ scan_out_logical_line (pfile, macro)
const uchar *cur;
uchar *out;
struct fun_macro fmacro;
- unsigned int c, paren_depth = 0, quote = 0;
+ unsigned int c, paren_depth = 0, quote;
enum ls lex_state = ls_none;
fmacro.buff = NULL;
start_logical_line:
+ quote = 0;
CUR (pfile->context) = pfile->buffer->cur;
RLIMIT (pfile->context) = pfile->buffer->rlimit;
pfile->out.cur = pfile->out.base;
@@ -502,7 +503,7 @@ scan_out_logical_line (pfile, macro)
quote = '>';
break;
case '>':
- if (pfile->state.angled_headers && c == quote)
+ if (c == quote)
{
pfile->state.angled_headers = false;
quote = 0;