+2003-12-10 Nathanael Nerode <neroden@gcc.gnu.org>
+
+ Backport from mainline (fixes unreported regression):
+ * cpptrad.c (_cpp_scan_out_logical_line): Improve test for
+ whether directive begins at the beginning of a line.
+
2003-12-10 Eric Botcazou <ebotcazou@libertysurf.fr>
PR target/13354
unsigned int c, paren_depth = 0, quote;
enum ls lex_state = ls_none;
bool header_ok;
+ const uchar *start_of_input_line;
fmacro.buff = NULL;
RLIMIT (pfile->context) = pfile->buffer->rlimit;
pfile->out.cur = pfile->out.base;
pfile->out.first_line = pfile->line;
+ /* start_of_input_line is needed to make sure that directives really,
+ really start at the first character of the line. */
+ start_of_input_line = pfile->buffer->cur;
new_context:
context = pfile->context;
cur = CUR (context);
break;
case '#':
- if (out - 1 == pfile->out.base
+ if (cur - 1 == start_of_input_line
/* A '#' from a macro doesn't start a directive. */
&& !pfile->context->prev
&& !pfile->state.in_directive)
+2003-12-10 Nathanael Nerode <neroden@gcc.gnu.org>
+
+ Backport from mainline:
+ * gcc.dg/cpp/trad/xwin1.c: New test case.
+
2003-12-10 Eric Botcazou <ebotcazou@libertysurf.fr>
Backport from mainline: