[PATCH preprocessor, diagnostics] PR preprocessor/53229 - Fix diagnostics location when pasting tokens
Jason Merrill
jason@redhat.com
Thu May 24 18:57:00 GMT 2012
On 05/24/2012 01:41 PM, Dodji Seketeli wrote:
> Jason Merrill<jason@redhat.com> writes:
>>
>> The approach sounds good, but why do this in the push_token_context
>> functions rather than in enter_macro_context?
>
> Because, it's not only in enter_macro_context that I'd have to put it,
> but also in replace_args, called from enter_macro_context, for instance.
Why?
> Another way of seeing it is to say that, from the beginning of
> enter_macro_context, we are in a state of "about to expand a macro"
> until we actually push the macro context. So it seems to make sense to
> flip the flag where the the macro context push happens, IMHO.
Sure, that makes sense. It just seems better to me to have the flag set
a little longer than necessary in order to keep the setting and
unsetting closer together for maintainability.
Jason
More information about the Gcc-patches
mailing list