This is the mail archive of the gcc-patches@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: [PATCH] PR debug/38757 gcc does not emit DW_LANG_C99


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


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