This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: avoiding gdb cc1plus PACK_EXPANSION_PATTERN(result) gives 'No symbol "__extension__"', error msg
- From: Ian Lance Taylor <iant at google dot com>
- To: Richard Henderson <rth at redhat dot com>
- Cc: Larry Evans <cppljevans at suddenlink dot net>, gcc at gcc dot gnu dot org
- Date: Wed, 08 Jul 2009 21:26:51 -0700
- Subject: Re: avoiding gdb cc1plus PACK_EXPANSION_PATTERN(result) gives 'No symbol "__extension__"', error msg
- References: <h334g5$ij2$1@ger.gmane.org> <4A551A3C.7020606@redhat.com>
Richard Henderson <rth@redhat.com> writes:
> A better project for helping debug gcc would be to convert all macros
> that use statement expressions into proper inline functions. Which
> would then be emitted as out-of-line functions by gcc's -fkeep-inlines
> flag, which would yield something that's callable from within gdb.
Conveniently, if you build with C++, the inline functions can return
references, so you don't have to change hundreds of occurrences of
REG_ATTRS (x) = ...;
into
SET_REG_ATTRS (x, ...);
You do still have to face the problem that the macros are often defined
before the structures that they use, so simple replacement with inline
functions fails.
Ian