This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: debug/3468: GCC 3.0 produces invalid .def directive for virtual template
- From: wilson at gcc dot gnu dot org
- To: gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, rose at acm dot org, wilson at gcc dot gnu dot org, wilson at redhat dot com
- Date: 10 Dec 2002 22:31:09 -0000
- Subject: Re: debug/3468: GCC 3.0 produces invalid .def directive for virtual template
- Reply-to: wilson at gcc dot gnu dot org, gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, rose at acm dot org, wilson at gcc dot gnu dot org, wilson at redhat dot com, gcc-gnats at gcc dot gnu dot org
Synopsis: GCC 3.0 produces invalid .def directive for virtual template
State-Changed-From-To: open->closed
State-Changed-By: wilson
State-Changed-When: Tue Dec 10 14:31:08 2002
State-Changed-Why:
In general, it isn't possible to fully support C++ with the coff/sdb
debug info format. The format was designed for K&R C, and is
so unextensible that it can't even handle ISO C correctly.
Use of a better debug info format is strongly recommended.
The GNU tools support stabs-in-coff, and this is the default
debug info format for this reason.
I am unable to reproduce the problem using the provided
testcase. It contains unexpanded macros for some reason.
I was able to generate my own testcase using gcc-3.0 sources
and reproduced the problem.
The suggested patch from Peter Vermaas is the correct way to
work around this problem.
I tried building current gcc sources, and they do not show this
failure. The internal representation of vtable pointers has
changed such that this work around is not at present needed.
Therefore, I am not checking in the patch.
I did discover a new problem though. The new mangler is
creating mangled names that start with digits. For instance
__type_traits<bool> is mangled into 13__type_traitsIbE in the
same file. The sdb format doesn't allow symbols to start with
digits, so neither the mangled nor unmangled name is valid.
There is no easy way to work around this problem. We would
have to create our own unique names for the purposes of
emitting valid coff/sdb debug info, and I don't see the point of
doing that.
If we really need a fix here, I could add a check for C++ and
coff/sdb and avoid emitting any debug info at all. That solves
the problem, but may not be a useful solution to you.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=3468