About trees and expanded code by macros
Paulo J. Matos
paulo@matos-sorge.com
Mon May 14 09:10:00 GMT 2012
Thanks for correcting me Manuel.
I am just getting acquainted with GCC4.7, good to know that information
has been added.
Cheers,
Paulo Matos
On 14/05/12 10:07, Manuel López-Ibáñez wrote:
> This information is incorrect.
>
> GCC tracks macro expansion information since GCC 4.7, and it has been
> further improved and enabled by default in GCC 4.8. See the option
> ftrack-macro-expansion and the interface located in
> libcpp/include/line-map.h.
>
> If you have trouble understanding the interface, find it lacking, and
> want to suggest improvements (patches would be even better), please do
> so.
>
> Cheers,
>
> Manuel.
>
>
> On 14 May 2012 10:49, Paulo J. Matos<paulo@matos-sorge.com> wrote:
>> Hi Alberto,
>>
>> As far as I understand it you want to know if a statement was expanded from
>> a preprocessor macro, right?
>>
>> This isn't possible. The preprocessor is a separate thing altogether and I
>> doubt any preprocessing information remains for the compiler proper to deal
>> with.
>>
>> Cheers,
>>
>> Paulo Matos
>>
>>
>> On 14/05/12 08:53, Alberto Lozano Alelu wrote:
>>>
>>> Hello.
>>>
>>> I'am developing an statement detector for c++ and I would like to
>>> detect if an statement is expanded from macro.
>>>
>>> Can I detect in ast tree if an statement is expanded code from macro?
>>>
>>> Thanks.
>>>
>>
>>
>> --
>> PMatos
>>
>
--
PMatos
More information about the Gcc
mailing list