List Info

Thread: Question on typedefs of anonymous structs in G++




Question on typedefs of anonymous structs in G++
country flaguser name
United States
2008-05-07 04:00:45
Re: Question on typedefs of anonymous structs in G++
country flaguser name
United States
2008-05-07 06:38:51
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

Re: Question on typedefs of anonymous structs in G++
country flaguser name
United States
2008-05-08 14:15:00
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.




[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )