cpplib bug fix (macro expansion)
Zack Weinberg
zack@rabi.columbia.edu
Thu Oct 8 10:13:00 GMT 1998
On Thu, 08 Oct 1998 12:02:32 -0400, Dave Brolley wrote:
>
>
>Zack Weinberg wrote:
>
>> Is it safe to assume macro buffers cannot contain newlines and
>> comments? If so, this patch should work.
>
>I'm not sure if that's true. Perhaps the best way to handle it would
>be to con tinue calling cpp_skip_hspace and change that function to
>return true if it skips anything other than a line continuation. You
>could then use that return value to set your flag.
collect_expansion is commented above:
/* ...
Note that comments, backslash-newlines, and leading white space
have already been deleted from the argument. */
A comment *can* appear if -traditional, but it gets turned into a
token paster. An un-backslashed newline can't get to
collect_expansion because copy_rest_of_line will have stopped there.
So the only way to get a hard newline into a macro definition is with
-D. Do you think this case is worth worrying about?
zw
More information about the Gcc-patches
mailing list