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: comparing function pointer with int does not produce error

2001-10-24 Thread Martin Dorey
Right, understood, finally. Thanks. -Original Message- From: Martin v. Loewis [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 24, 2001 8:43 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]; debian-gcc@lists.debian.org; [EMAIL PROTECTED] Subject: Re:

Re: comparing function pointer with int does not produce error

2001-10-24 Thread Martin v. Loewis
> I can't disagree with your reading ("involve" doesn't mean "be"). However, > searching for "integral constant expression" suggests to me that this > outlaws the following code, all of which compiles without warning: > > enum {dim = 1}; > char a [dim]; // 8.3.4.1 Please note that only null poin

gcc-3.0_3.0.2ds4-1_i386.changes INSTALLED

2001-10-24 Thread Debian Installer
Installing: gcc-3.0-base_3.0.2-1_all.deb to pool/main/g/gcc-3.0/gcc-3.0-base_3.0.2-1_all.deb libstdc++3-dbg_3.0.2-1_i386.deb to pool/main/g/gcc-3.0/libstdc++3-dbg_3.0.2-1_i386.deb gcc-3.0_3.0.2ds4-1.diff.gz to pool/main/g/gcc-3.0/gcc-3.0_3.0.2ds4-1.diff.gz g77-3.0_3.0.2-1_i386.deb to pool/

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

2001-10-24 Thread Richard B. Kreckel
On Wed, 24 Oct 2001, Daniel Jacobowitz wrote: > If you're order-sensitive, you've got a problem. Lots of real C++ code is order-sensitive. This is a serious problem and there are a couple of ugly solutions to it. The best solution would be to teach the linker about it. The solution we are talk

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

2001-10-24 Thread Daniel Jacobowitz
On Wed, Oct 24, 2001 at 05:59:24PM +0200, Richard B. Kreckel wrote: > On Wed, 24 Oct 2001, Daniel Jacobowitz wrote: > [...] > > > Could you please provide a pointer or two to code samples or things that > > > might be helpful implementing it the Right Way, since I intend to try and > > > fix it? (

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

2001-10-24 Thread Richard B. Kreckel
On Wed, 24 Oct 2001, Daniel Jacobowitz wrote: [...] > > Could you please provide a pointer or two to code samples or things that > > might be helpful implementing it the Right Way, since I intend to try and > > fix it? (Dunno if I'm old enough for this, though.) > > > > Thanks a lot for all the i

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

2001-10-24 Thread Daniel Jacobowitz
On Wed, Oct 24, 2001 at 01:06:48PM +0200, Richard B. Kreckel wrote: > > OOOoopsss > > Could you please provide a pointer or two to code samples or things that > might be helpful implementing it the Right Way, since I intend to try an

Re: comparing function pointer with int does not produce error

2001-10-24 Thread Daniel Jacobowitz
On Wed, Oct 24, 2001 at 09:15:00AM +0200, Martin v. Loewis wrote: > > I don't think you're arguing the right side. Look at my message - I > > don't know what the poster did, but _MY_ installed g++ v3.0 declares it > > invalid. > > And I assume everybody else's does so, as well: on my system, bo

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

2001-10-24 Thread Richard B. Kreckel
On Tue, 23 Oct 2001, Daniel Jacobowitz wrote: > [...] > > > > hmm, I was under the impression, that enabling -fuse-cxa-atexit as the > > default on a glibc-2.2 based system, was safe. > > > > You get the code you want with -fno-use-cxa-atexit. Should we revert > > this change? > > I don't think

RE: comparing function pointer with int does not produce error

2001-10-24 Thread Martin Dorey
I can't disagree with your reading ("involve" doesn't mean "be"). However, searching for "integral constant expression" suggests to me that this outlaws the following code, all of which compiles without warning: enum {dim = 1}; char a [dim]; // 8.3.4.1 void* b = new char [1] [dim]; // 5.3.4.6 st

Re: comparing function pointer with int does not produce error

2001-10-24 Thread Martin v. Loewis
> > I'll take another attempt at declaring gcc behaviour to be correct. > > According to 4.10/1, "success" is a null pointer constant: > > > > # A null pointer constant is an integral constant expression (5.19) > > # rvalue of integer type that evaluates to zero. A null pointer > > # constant can

Re: Bug#116875: g++-3.0: nested type converter in initializer confuses gcc

2001-10-24 Thread Martin v. Loewis
>non-aggregate type `Foo ()(int (*)())' > // This is the problematic line: > Foo broken(int(returnLong())); [...] > The error message from g++ is: > gcc-bug-constructor.cc:36: request for member `field' in `broken', which is > of >non-aggregate type `Foo ()(int (*)())' Thank

RE: comparing function pointer with int does not produce error

2001-10-24 Thread Andy Chittenden
> I'll take another attempt at declaring gcc behaviour to be correct. > According to 4.10/1, "success" is a null pointer constant: > > # A null pointer constant is an integral constant expression (5.19) > # rvalue of integer type that evaluates to zero. A null pointer > # constant can be converted

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

Re: comparing function pointer with int does not produce error

2001-10-24 Thread Martin v. Loewis
> I don't think you're arguing the right side. Look at my message - I > don't know what the poster did, but _MY_ installed g++ v3.0 declares it > invalid. And I assume everybody else's does so, as well: on my system, both g++ 2.95 and 3.1 20011009 complain about your code (where the constant is

Bug#116875: g++-3.0: nested type converter in initializer confuses gcc

2001-10-24 Thread Patrick Tullmann
Package: g++-3.0 Version: 1:3.0.2-0pre010922 Severity: normal File: /usr/bin/g++-3.0 The attached file demonstrates that g++ (in Debian/testing) barfs on a nested int conversion of a static function in a constructor expecting an int. (See the main local variable 'broken' in the example.) My expe

Re: comparing function pointer with int does not produce error

2001-10-24 Thread Daniel Jacobowitz
On Tue, Oct 23, 2001 at 11:51:46PM +0200, Martin v. Loewis wrote: > > On Tue, Oct 23, 2001 at 08:21:26PM +0200, Martin v. Loewis wrote: > > > > The following code does not produce an error when one is > > > > expected. > > > > void stat (); > > > > > > > > static const int success = 0; >