+2002-11-08 Neil Booth <neil@daikokuya.co.uk>
+
+ PR preprocessor/8497
+ PR preprocessor/8501
+ * cpptrad.c (scan_out_logical_line): A '#' from a macro doesn't
+ start a directive. In assembler, #NUM is not a line directive.
+
2002-11-08 Neil Booth <neil@daikokuya.co.uk>
* cppmain.c (cpp_preprocess_file): Loop to pop any -included
break;
case '#':
- if (out - 1 == pfile->out.base && !pfile->state.in_directive)
+ if (out - 1 == pfile->out.base
+ /* A '#' from a macro doesn't start a directive. */
+ && !pfile->context->prev
+ && !pfile->state.in_directive)
{
/* A directive. With the way _cpp_handle_directive
currently works, we only want to call it if either we
{
bool do_it = false;
- if (is_numstart (*cur))
+ if (is_numstart (*cur)
+ && CPP_OPTION (pfile, lang) != CLK_ASM)
do_it = true;
else if (is_idstart (*cur))
/* Check whether we know this directive, but don't