This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] PR debug/38757 gcc does not emit DW_LANG_C99
- From: Mark Wielaard <mjw at redhat dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Richard Biener <richard dot guenther at gmail dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>, Jason Merrill <jason at redhat dot com>, Aldy Hernandez <aldyh at redhat dot com>
- Date: Wed, 12 Nov 2014 16:46:39 +0100
- Subject: Re: [PATCH] PR debug/38757 gcc does not emit DW_LANG_C99
- Authentication-results: sourceware.org; auth=none
- References: <1412763235-23197-1-git-send-email-mjw at redhat dot com> <1413189233 dot 5534 dot 23 dot camel at bordewijk dot wildebeest dot org> <1415803819 dot 4965 dot 13 dot camel at bordewijk dot wildebeest dot org> <20141112145413 dot GG5026 at tucnak dot redhat dot com> <CAFiYyc0cHUZ95cF+=XGF-OLp9qdJ4-JO46EEP1O5d8uCH-cuqw at mail dot gmail dot com> <20141112153352 dot GI5026 at tucnak dot redhat dot com>
On Wed, 2014-11-12 at 16:33 +0100, Jakub Jelinek wrote:
> On Wed, Nov 12, 2014 at 04:21:09PM +0100, Richard Biener wrote:
> > On Wed, Nov 12, 2014 at 3:54 PM, Jakub Jelinek <jakub@redhat.com> wrote:
> > > I think we want this (also extended for C11/C++11/C++14 afterwards), even
> > > when the early debug bits won't be ready for GCC 5; LTO will just continue
> > > claiming to be old C (or whatever it claims right now), but there is
> > > hope it will be improved for GCC 6.
> > >
> > > But, I can't approve my own patch... Richard, can you live with this?
> >
> > Why doesn't the patch simply make the FE return sth different
> > in lang_hooks.name? Like "GNU C99" or "GNU ObjC"? Or
> > even better change that to an unsigned int containing
> > DW_LANG_* directly and not a string?
>
> That is an option too, Mark, do you want to work on such a patch?
I don't mind changing the language hook to return the actual DW_LANG_*
constant directly, that seems like a nice cleanup.
But I don't think we can just replace TRANSLATION_UNIT_LANGUAGE and
lang_hooks.name. The name is (explicitly) const and isused to identify
the frontend used for a particular language in various places (for
example some backends seem to use it to write out some language/abi
information, or to detect when to use IEEE compliance mode, pch uses it
to match whether a header can be reused, the constant folder uses it to
make some decisions, etc.
So shall I change the patch so that the lang hook explicitly encodes the
DW_LANG_* constant/language standard variant in use, but keep
lang_hooks.name as is to not break any other users?
Thanks,
Mark