This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [C++ PATCH] Fix pretty-print of enumerator ids (PR c++/87364)
- From: Christophe Lyon <christophe dot lyon at linaro dot org>
- To: Jeff Law <law at redhat dot com>
- Cc: wjwray at gmail dot com, gcc Patches <gcc-patches at gcc dot gnu dot org>, webrown dot cpp at gmail dot com, antoshkka at gmail dot com, marxin at gcc dot gnu dot org, msebor at gcc dot gnu dot org
- Date: Fri, 12 Oct 2018 07:47:07 +0200
- Subject: Re: [C++ PATCH] Fix pretty-print of enumerator ids (PR c++/87364)
- References: <CAKjnZWoY1j+j=CgMx7T0bcxFyOPhQ29MnU=aTXAah1e43pdm-Q@mail.gmail.com> <a0fab6c2-53d7-a036-f720-990adcede4e6@redhat.com>
On Fri, 12 Oct 2018 at 05:37, Jeff Law <law@redhat.com> wrote:
>
> On 10/8/18 11:12 AM, will wray wrote:
> > Hi,
> >
> > A PR to fix Bug 87364 - Pretty print of enumerator never prints the id,
> > always falls back to C-style cast output
> >
> > The fix is tested with the code attached to the bug report and additional
> > usage over the past few weeks.
> >
> > Bootstrap and regtested on x86_64-linux. OK for trunk?
> >
> >
> > 2018-10-08 Will Wray <wjwray@gmail.com>
> >
> > PR c++/87364
> > * c-pretty-print.c (pp_c_enumeration_constant): fix comparison.
> > * cxx-pretty-print.c (pp_cxx_enumeration_constant): New; add
> > nested-specifiers prefix to enum id plus enum type for scoped enum.
> THanks. I fixed up some whitespace issues and the ChangeLog entry
> before committing to the trunk.
>
> Also note for any future contributions, it looks like your mailer is
> messing up tabs and wrapping lines. That makes applying the patch more
> difficult than it should be.
>
Hi,
This commit broke the GCC builds:
/tmp/3768585_6.tmpdir/aci-gcc-fsf/sources/gcc-fsf/gccsrc/gcc/c-family/c-pretty-print.c:
In member function 'virtual void c_pretty_printer::constant(tree)':
/tmp/3768585_6.tmpdir/aci-gcc-fsf/sources/gcc-fsf/gccsrc/gcc/c-family/c-pretty-print.c:1141:39:
error: expected ';' before ')' token
pp_c_enumeration_constant (this, e))
^
make[2]: *** [c-family/c-pretty-print.o] Error 1
> Jeff