[PATCH c++] Fix pr22138
Gabriel Dos Reis
gdr@integrable-solutions.net
Thu Jun 10 10:28:00 GMT 2010
On Thu, Jun 10, 2010 at 4:41 AM, Manuel López-Ibáñez
<lopezibanez@gmail.com> wrote:
> On 10 June 2010 11:34, Paolo Carlini <paolo.carlini@oracle.com> wrote:
>> On 06/10/2010 10:26 AM, Shujing Zhao wrote:
>>>>
>>>> Also why don't you use the function at_function_scope_p() to test
>>>> whether you are at local scope?
>>> The parser itself know whether or not it is in the body of a function.
>>> The in_funtion_body is also more efficient that calling
>>> at_function_scope_p. I think using parser->in_function_body is better
>>> than at_function_scope_p.
>> As a matter of fact, in the entire parser.c there are no uses of
>> at_function_scope_p, and ~20 of in_function_body. Was curious... ;)
>
> It would be nice to add a comment to at_function_scope_p() or prevent
> somehow to use it in the parser, so no one uses inadvertently. Perhaps
> moving it to semantics.h. You know, modularization. Moreover, that
> function should probably be inline. Although perhaps this does not
> matter with LTO available.
>
agreed.
More information about the Gcc-patches
mailing list