diff options
author | neil <neil@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-06-28 06:26:54 +0000 |
---|---|---|
committer | neil <neil@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-06-28 06:26:54 +0000 |
commit | 94fed2997a88a94f06e1fe24bc075692c2077386 (patch) | |
tree | a7a80d0a2c536203d919b2a5eb3328aa0e029f54 /gcc | |
parent | fbf041b8155e2b3eb6300b1988aedbceb30501ee (diff) | |
download | ppe42-gcc-94fed2997a88a94f06e1fe24bc075692c2077386.tar.gz ppe42-gcc-94fed2997a88a94f06e1fe24bc075692c2077386.zip |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@55055 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/cpplib.c | 8 | ||||
-rw-r--r-- | gcc/cpptrad.c | 5 |
3 files changed, 15 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ab1a59b1859..42ac032fac0 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 6bb9f4d1bb2..f2d33a89e48 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 4d07d528de8..a72237b87b8 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; |