This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: About trees and expanded code by macros


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
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]