From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28179 invoked by alias); 10 Dec 2002 22:31:10 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 28153 invoked by uid 61); 10 Dec 2002 22:31:09 -0000 Date: Tue, 10 Dec 2002 14:31:00 -0000 Message-ID: <20021210223109.28152.qmail@sources.redhat.com> To: gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, rose@acm.org, wilson@gcc.gnu.org, wilson@redhat.com From: wilson@gcc.gnu.org Reply-To: wilson@gcc.gnu.org, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, rose@acm.org, wilson@gcc.gnu.org, wilson@redhat.com, gcc-gnats@gcc.gnu.org Subject: Re: debug/3468: GCC 3.0 produces invalid .def directive for virtual template X-SW-Source: 2002-12/txt/msg00589.txt.bz2 List-Id: 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 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