This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: More empty body checks
Mike Stump wrote:
>> This should be folded into the callers, to avoid the redundant token
>> peeking:
>>
>> if (cp_parser_require (CPP_CLOSE_PAREN))
>> check_empty_body (...);
>
> Ah, but they already do this. The problem is that I need to hold onto
> the token or the location information at least after that point, so, I
> need to run before it's required, as otherwise it would be consumed.
The peeking is pretty cheap, so let's not worry about it.
Revised version is OK.
Thanks,
--
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713