Debian Bug report logs -
#44356
bug in new.h
Reported by: colin@field.medicine.adelaide.edu.au
Date: Sun, 5 Sep 1999 05:14:04 UTC
Severity: normal
Found in version 2.95.1-1
Done: Daniel Jacobowitz <dan@debian.org>
Bug is archived. No further changes may be made.
Forwarded to gcc-bugs@gcc.gnu.org
Toggle useless messages
Report forwarded to debian-bugs-dist@lists.debian.org, Debian GCC maintainers <gcc@packages.debian.org>
:
Bug#44356
; Package g++
.
(full text, mbox, link).
Acknowledgement sent to colin@field.medicine.adelaide.edu.au
:
New bug report received and forwarded. Copy sent to Debian GCC maintainers <gcc@packages.debian.org>
.
(full text, mbox, link).
Message #5 received at submit@bugs.debian.org (full text, mbox, reply):
Package: g++
Version: 2.95.1-1
/usr/lib/gcc-lib/i386-linux/2.95.1/include/new lines 37.. are:
// default placement versions of operator new
inline void *operator new(size_t, void *place) throw() { return place; }
inline void *operator new[](size_t, void *place) throw() { return place; }
The use of inline definition here precludes me from defining my own new
operators.
I consider this a bug.
I suggest the { return place; } bodies be removed, and the definition
be moved somewhere less intrusive.
Colin.
Information forwarded to debian-bugs-dist@lists.debian.org, Debian GCC maintainers <gcc@packages.debian.org>
:
Bug#44356
; Package g++
.
(full text, mbox, link).
Acknowledgement sent to Daniel Jacobowitz <drow@false.org>
:
Extra info received and forwarded to list. Copy sent to Debian GCC maintainers <gcc@packages.debian.org>
.
(full text, mbox, link).
Message #10 received at 44356@bugs.debian.org (full text, mbox, reply):
On Tue, Sep 07, 1999 at 06:09:24PM +0200, Matthias Klose wrote:
> Daniel Jacobowitz writes:
> > On Mon, Sep 06, 1999 at 05:27:32PM -0400, Daniel Jacobowitz wrote:
> > > Anyway, this version still can't build apt; I have a workaround which
> > > I'm testing now.
> >
> > Yep, fixed it. This patch is a bit of a hack; it's been fixed in the
> > mainline much better. Should be completely safe though.
>
> the patch is not ppc specific, isn't it?
No, it's not PPC specific. It only happens on PPC, but that it happens
at all is a wierd fluke of bad luck.
>
> May I ask you to look at the report
>
> http://www.debian.org/Bugs/db/44/44356.html
>
> Is there a way to fix the libstdc++-out-of-mem.dpatch report _and_ to
> fix 44356?
I don't see how #44356 is a bug. It prevents him from defining his own
two-argument new function in the default namespace; he can still define
one in any class he chooses. If the function bodies were off in a
library somewhere he would have to override them in order to redefine
new, which is not a legal course of action in C++, as far as I know.
>
> Thanks, Matthias
>
Dan
/--------------------------------\ /--------------------------------\
| Daniel Jacobowitz |__| SCS Class of 2002 |
| Debian GNU/Linux Developer __ Carnegie Mellon University |
| dan@debian.org | | dmj+@andrew.cmu.edu |
\--------------------------------/ \--------------------------------/
Information forwarded to debian-bugs-dist@lists.debian.org, Debian GCC maintainers <gcc@packages.debian.org>
:
Bug#44356
; Package g++
.
(full text, mbox, link).
Acknowledgement sent to Matthias Klose <doko@cs.tu-berlin.de>
:
Extra info received and forwarded to list. Copy sent to Debian GCC maintainers <gcc@packages.debian.org>
.
(full text, mbox, link).
Message #15 received at 44356@bugs.debian.org (full text, mbox, reply):
Daniel Jacobowitz writes:
> On Tue, Sep 07, 1999 at 06:09:24PM +0200, Matthias Klose wrote:
> > Daniel Jacobowitz writes:
> > > On Mon, Sep 06, 1999 at 05:27:32PM -0400, Daniel Jacobowitz wrote:
> > > > Anyway, this version still can't build apt; I have a workaround which
> > > > I'm testing now.
> > >
> > > Yep, fixed it. This patch is a bit of a hack; it's been fixed in the
> > > mainline much better. Should be completely safe though.
> >
> > the patch is not ppc specific, isn't it?
>
> No, it's not PPC specific. It only happens on PPC, but that it happens
> at all is a wierd fluke of bad luck.
ok, then I change the prefix frpm ppc to g++.
> > May I ask you to look at the report
> >
> > http://www.debian.org/Bugs/db/44/44356.html
> >
> > Is there a way to fix the libstdc++-out-of-mem.dpatch report _and_ to
> > fix 44356?
>
> I don't see how #44356 is a bug. It prevents him from defining his own
> two-argument new function in the default namespace; he can still define
> one in any class he chooses. If the function bodies were off in a
> library somewhere he would have to override them in order to redefine
> new, which is not a legal course of action in C++, as far as I know.
sorry, wrong bug number ... 44446
Reply sent to Matthias Klose <doko@cs.tu-berlin.de>
:
You have taken responsibility.
(full text, mbox, link).
Notification sent to colin@field.medicine.adelaide.edu.au
:
Bug acknowledged by developer.
(full text, mbox, link).
Message #20 received at 44356-done@bugs.debian.org (full text, mbox, reply):
Daniel Jacobowitz writes:
> I don't see how #44356 is a bug. It prevents him from defining his own
> two-argument new function in the default namespace; he can still define
> one in any class he chooses. If the function bodies were off in a
> library somewhere he would have to override them in order to redefine
> new, which is not a legal course of action in C++, as far as I know.
Information forwarded to debian-bugs-dist@lists.debian.org, Debian GCC maintainers <gcc@packages.debian.org>
:
Bug#44356
; Package g++
.
(full text, mbox, link).
Acknowledgement sent to Matthias Klose <doko@cs.tu-berlin.de>
:
Extra info received and forwarded to list. Copy sent to Debian GCC maintainers <gcc@packages.debian.org>
.
(full text, mbox, link).
Message #25 received at 44356@bugs.debian.org (full text, mbox, reply):
reopen 44356
thanks
please don't open new bugs, when adding information to already
reported ones. Somebody wants to forward this to gcc-bugs@gcc.gnu.org?
Colin McCormack writes:
> Hi,
>
> Daniel Jacobowitz is mistaken, it prevents me from overriding an operator.
>
> As far as I'm aware, overriding an operator is perfectly legal in C++.
>
> I look at the draft C++ standard, here:
> http://www.cygnus.com:80/misc/wp/draft/lib-support.html#lib.new.delete
>
> And it says (of dyadic operator new):
> a C++ program may define a function with this function signature
> that displaces the default version defined by the C++ Standard
> library.
>
> So this library doesn't conform to the standard. Not a bug?
>
> Colin.
>
> > Daniel Jacobowitz writes:
> > > I don't see how #44356 is a bug. It prevents him from defining his own
> > > two-argument new function in the default namespace; he can still define
> > > one in any class he chooses. If the function bodies were off in a
> > > library somewhere he would have to override them in order to redefine
> > > new, which is not a legal course of action in C++, as far as I know.
>
Bug reopened, originator not changed.
Request was from Matthias Klose <doko@cs.tu-berlin.de>
to control@bugs.debian.org
.
(full text, mbox, link).
Information forwarded to debian-bugs-dist@lists.debian.org, Debian GCC maintainers <gcc@packages.debian.org>
:
Bug#44356
; Package g++
.
(full text, mbox, link).
Acknowledgement sent to Matthias Klose <doko@cs.tu-berlin.de>
:
Extra info received and forwarded to list. Copy sent to Debian GCC maintainers <gcc@packages.debian.org>
.
(full text, mbox, link).
Message #32 received at 44356@bugs.debian.org (full text, mbox, reply):
[ This feature or bug was reported to the Debian bug tracking system;
please CC 44356@bugs.debian.org for replys.
See http://www.debian.org/Bugs/db/44/44356.html for the complete report]
The submitter of the bug reported:
> /usr/lib/gcc-lib/i386-linux/2.95.1/include/new lines 37.. are:
>
> // default placement versions of operator new
> inline void *operator new(size_t, void *place) throw() { return place; }
> inline void *operator new[](size_t, void *place) throw() { return place; }
>
> The use of inline definition here precludes me from defining my own new
> operators.
>
> I consider this a bug.
>
> I suggest the { return place; } bodies be removed, and the definition
> be moved somewhere less intrusive.
Another developer responded:
> I don't see how #44356 is a bug. It prevents him from defining his
> own two-argument new function in the default namespace; he can still
> define one in any class he chooses. If the function bodies were off
> in a library somewhere he would have to override them in order to
> redefine new, which is not a legal course of action in C++, as far
> as I know.
and the response of the bug submitter:
> Daniel Jacobowitz is mistaken, it prevents me from overriding an operator.
>
> As far as I'm aware, overriding an operator is perfectly legal in C++.
>
> I look at the draft C++ standard, here:
> http://www.cygnus.com:80/misc/wp/draft/lib-support.html#lib.new.delete
>
> And it says (of dyadic operator new):
> a C++ program may define a function with this function signature
> that displaces the default version defined by the C++ Standard
> library.
>
> So this library doesn't conform to the standard. Not a bug?
Noted your statement that Bug has been forwarded to gcc-bugs@gcc.gnu.org.
Request was from Matthias Klose <doko@cs.tu-berlin.de>
to control@bugs.debian.org
.
(full text, mbox, link).
Information forwarded to debian-bugs-dist@lists.debian.org, Debian GCC maintainers <gcc@packages.debian.org>
:
Bug#44356
; Package g++
.
(full text, mbox, link).
Acknowledgement sent to "Martin v. Loewis" <martin@mira.isdn.cs.tu-berlin.de>
:
Extra info received and forwarded to list. Copy sent to Debian GCC maintainers <gcc@packages.debian.org>
.
(full text, mbox, link).
Message #39 received at 44356@bugs.debian.org (full text, mbox, reply):
> > I look at the draft C++ standard, here:
> > http://www.cygnus.com:80/misc/wp/draft/lib-support.html#lib.new.delete
> >
> > And it says (of dyadic operator new):
> > a C++ program may define a function with this function signature
> > that displaces the default version defined by the C++ Standard
> > library.
> >
> > So this library doesn't conform to the standard. Not a bug?
Not a bug, the library conforms to the standard. Looking at ISO/IEC
14882:1998(E) (which is essentially the same as the draft cited above
in this aspect), I see 18.4.1.3, [lib.new.delete.placement]/1
# These functions are reserved, a C++ program may not define functions
# that displace the versions in the Standard C++ library (17.4.3).
#
# void* operator new(std::size_t size, void* ptr) throw();
I don't know which dyadic variant of operator new you were originally
looking at; perhaps the 'nothrow' version? This is different from the
placement version.
Regards,
Martin
Reply sent to Daniel Jacobowitz <dan@debian.org>
:
You have taken responsibility.
(full text, mbox, link).
Notification sent to colin@field.medicine.adelaide.edu.au
:
Bug acknowledged by developer.
(full text, mbox, link).
Message #44 received at 44356-done@bugs.debian.org (full text, mbox, reply):
And on this note I'm closing the bug.
----- Forwarded message from "Martin v. Loewis" <martin@mira.isdn.cs.tu-berlin.de> -----
Date: Sun, 21 Nov 1999 18:46:26 +0100
From: "Martin v. Loewis" <martin@mira.isdn.cs.tu-berlin.de>
To: doko@cs.tu-berlin.de
CC: gcc-bugs@gcc.gnu.org, 44356@bugs.debian.org,
colin@field.medicine.adelaide.edu.au, dan@debian.org
Subject: Re: bug in new.h?
> > I look at the draft C++ standard, here:
> > http://www.cygnus.com:80/misc/wp/draft/lib-support.html#lib.new.delete
> >
> > And it says (of dyadic operator new):
> > a C++ program may define a function with this function signature
> > that displaces the default version defined by the C++ Standard
> > library.
> >
> > So this library doesn't conform to the standard. Not a bug?
Not a bug, the library conforms to the standard. Looking at ISO/IEC
14882:1998(E) (which is essentially the same as the draft cited above
in this aspect), I see 18.4.1.3, [lib.new.delete.placement]/1
# These functions are reserved, a C++ program may not define functions
# that displace the versions in the Standard C++ library (17.4.3).
#
# void* operator new(std::size_t size, void* ptr) throw();
I don't know which dyadic variant of operator new you were originally
looking at; perhaps the 'nothrow' version? This is different from the
placement version.
Regards,
Martin
----- End forwarded message -----
Dan
/--------------------------------\ /--------------------------------\
| Daniel Jacobowitz |__| SCS Class of 2002 |
| Debian GNU/Linux Developer __ Carnegie Mellon University |
| dan@debian.org | | dmj+@andrew.cmu.edu |
\--------------------------------/ \--------------------------------/
Send a report that this bug log contains spam.
Debian bug tracking system administrator <owner@bugs.debian.org>.
Last modified:
Mon May 6 07:22:03 2024;
Machine Name:
buxtehude
Debian Bug tracking system
Debbugs is free software and licensed under the terms of the GNU
Public License version 2. The current version can be obtained
from https://bugs.debian.org/debbugs-source/.
Copyright © 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson,
2005-2017 Don Armstrong, and many other contributors.