* Question on typedefs of anonymous structs in G++
@ 2008-05-07 9:01 Paul Hilfinger
2008-05-07 11:39 ` Daniel Jacobowitz
2008-05-08 19:15 ` Michael Snyder
0 siblings, 2 replies; 3+ messages in thread
From: Paul Hilfinger @ 2008-05-07 9:01 UTC (permalink / raw)
To: gdb
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.
Paul Hilfinger
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Question on typedefs of anonymous structs in G++
2008-05-07 9:01 Question on typedefs of anonymous structs in G++ Paul Hilfinger
@ 2008-05-07 11:39 ` Daniel Jacobowitz
2008-05-08 19:15 ` Michael Snyder
1 sibling, 0 replies; 3+ messages in thread
From: Daniel Jacobowitz @ 2008-05-07 11:39 UTC (permalink / raw)
To: Paul Hilfinger; +Cc: gdb
On Wed, May 07, 2008 at 05:00:45AM -0400, Paul Hilfinger wrote:
> 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.
It is presumably just a bug (if the type is used somewhere); I suggest
verifying it on HEAD and putting it in gcc's bugzilla.
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Question on typedefs of anonymous structs in G++
2008-05-07 9:01 Question on typedefs of anonymous structs in G++ Paul Hilfinger
2008-05-07 11:39 ` Daniel Jacobowitz
@ 2008-05-08 19:15 ` Michael Snyder
1 sibling, 0 replies; 3+ messages in thread
From: Michael Snyder @ 2008-05-08 19:15 UTC (permalink / raw)
To: Hilfinger; +Cc: gdb
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.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-05-08 19:15 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-05-07 9:01 Question on typedefs of anonymous structs in G++ Paul Hilfinger
2008-05-07 11:39 ` Daniel Jacobowitz
2008-05-08 19:15 ` Michael Snyder
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox