From: neil Date: Fri, 8 Nov 2002 22:36:22 +0000 (+0000) Subject: PR preprocessor/8497 X-Git-Tag: upstream/4.9.2~83513 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=60757a559817841470a83f3f8ec87916e684b49c;p=platform%2Fupstream%2Flinaro-gcc.git 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@58938 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b473c78..5f5fee4 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,12 @@ 2002-11-08 Neil Booth + 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 + * cppmain.c (cpp_preprocess_file): Loop to pop any -included buffers. diff --git a/gcc/cpptrad.c b/gcc/cpptrad.c index 51b0bfc..902ae49 100644 --- a/gcc/cpptrad.c +++ b/gcc/cpptrad.c @@ -682,7 +682,10 @@ scan_out_logical_line (pfile, macro) 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 @@ -705,7 +708,8 @@ scan_out_logical_line (pfile, macro) { 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