Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Michael Snyder <msnyder@specifix.com>
To: Hilfinger@adacore.com
Cc: gdb@sourceware.org
Subject: Re: Question on typedefs of anonymous structs in G++
Date: Thu, 08 May 2008 19:15:00 -0000	[thread overview]
Message-ID: <1210274100.4615.495.camel@localhost.localdomain> (raw)
In-Reply-To: <20080507090045.51A1048CC44@nile.gnat.com>

On Wed, 2008-05-07 at 05:00 -0400, Paul Hilfinger wrote:
> Using g++ 4.1 on Linux (at least), I observe that a type such as
> 
>       typedef struct {
>           ...
>       } Foo;
> 
> produces no trace of debugging information about Foo.  Serves one
> right for writing a C-style definition of Foo in a C++ program, to be
> sure, but G++ used to include Foo in the debugging data.  Does anyone
> here happen to know the story behind the change?  Thanks.

Did you actually declare an object of the type?
And use the object, so that it couldn't be optimized away?

Without an instance of a type, G++ will likely optimize the 
debug info for the type away.




      parent reply	other threads:[~2008-05-08 19:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-07  9:01 Paul Hilfinger
2008-05-07 11:39 ` Daniel Jacobowitz
2008-05-08 19:15 ` Michael Snyder [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1210274100.4615.495.camel@localhost.localdomain \
    --to=msnyder@specifix.com \
    --cc=Hilfinger@adacore.com \
    --cc=gdb@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox