This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: g++ static data members [solaris27 + gcc-2.95.2/egcs]



> > It's clear to me that _S_table should be in .data, not .bss.
> 
> That's fine, but wrong:

Ok. Fair enough. It's clear to me that sparc-solaris and x86-linux should
put this data member in the same section. Either it should be runtime
initialized, and in .bss or it should be in .data. Why isn't the behavior
the same xplatform? 

>   3.6.2  Initialization of non-local objects          [basic.start.init]
[snip]
> 
> We are allowed to generate this type of code if we want to.  Do you
> mean to critique our code generation strategy, or are you just being
> confused by it, I can't tell.  My guess is that you are being confused
> by it.  You cannot rely upon (in C++) it being initialized until the
> dymanic point in program start up is hit: Welcome to C++.

I critique inconsistent behavior.

I've reworked the relevant v-3 bits in question so that it works on both
platforms. I'm still curious though.


> it.(?)  It used to not be run time initialized.  I don't know why Mark
> wanted to defer it.  Maybe that was an accident?  If so, I think it
> should be moved back to static time initialization.  The change that I
> was guessing is related was:
> 
> 1999-09-30  Mark Mitchell  <mark@codesourcery.com>

??

Jason mentioned this as the probable cause earlier today:


"I suspect that Solaris case gets initialized at runtime, because
the expression '__ctype_mask' doesn't pass muster with
initializer_constant_valid_p for some reason."



-benjamin




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]