Re: Bug#116823: Debian's g++-3.0 forgets to generate some code.

2001-10-28 Thread Richard B. Kreckel
On Sat, 27 Oct 2001, Nathan Myers wrote: [...] > > I'd say that the best solution would be to get rid of globals. This is > > actually very easy: > > > > If you have > > TYPE VAR = INITIALIZER; > > replace that with > > TYPE& getVAR(){ static TYPE obj = INITIALIZER; return obj; } > > > > T

Re: Bug#116823: Debian's g++-3.0 forgets to generate some code.

2001-10-28 Thread Nathan Myers
On Wed, Oct 24, 2001 at 11:48:02PM +0200, Martin v. Loewis wrote: > > Lots of real C++ code is order-sensitive. This is a serious problem and > > there are a couple of ugly solutions to it. > > I'd say that the best solution would be to get rid of globals. This is > actually very easy: > > If

Re: Bug#116823: Debian's g++-3.0 forgets to generate some code.

2001-10-26 Thread Richard B. Kreckel
Hi, On Thu, 25 Oct 2001, Martin v. Loewis wrote: > > I don't like this `construct on first use' idiom at all, aesthetically. > > Isn't this exactly what you want, and what modules.h does? If module A > uses module B, construction of A first constructs B. Sure it is. > > I find it disgusting t

Re: Bug#116823: Debian's g++-3.0 forgets to generate some code.

2001-10-25 Thread Martin v. Loewis
> I don't like this `construct on first use' idiom at all, aesthetically. Isn't this exactly what you want, and what modules.h does? If module A uses module B, construction of A first constructs B. > I find it disgusting to use a function call for that and a > preprocessor symbol. Well, you do

Re: Bug#116823: Debian's g++-3.0 forgets to generate some code.

2001-10-25 Thread Richard B. Kreckel
On Wed, 24 Oct 2001, Martin v. Loewis wrote: > I'd say that the best solution would be to get rid of globals. This is > actually very easy: > > If you have > > TYPE VAR = INITIALIZER; > > replace that with > > TYPE& getVAR(){ > static TYPE obj = INITIALIZER; > return obj; > } > > Then use

Re: Bug#116823: Debian's g++-3.0 forgets to generate some code.

2001-10-24 Thread Martin v. Loewis
> Lots of real C++ code is order-sensitive. This is a serious problem and > there are a couple of ugly solutions to it. I'd say that the best solution would be to get rid of globals. This is actually very easy: If you have TYPE VAR = INITIALIZER; replace that with TYPE& getVAR(){ static T

Re: Bug#116823: Debian's g++-3.0 forgets to generate some code.

2001-10-24 Thread Martin v. Loewis
> > You get the code you want with -fno-use-cxa-atexit. Should we revert > > this change? > > I don't think so. I'm 90% positive that this is CLN's fault. > Inserting labels in the body of a function is a somewhat disgusting way > to do it! I agree. There is no guarantee in the C++ language, or