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]

c++/2518: user-declared operator new hides standard one



>Number:         2518
>Category:       c++
>Synopsis:       user-declared operator new hides standard one
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          rejects-legal
>Submitter-Id:   net
>Arrival-Date:   Mon Apr 09 09:06:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Ivan Godard
>Release:        3.0 (Code Sorcery online; also 2.95)
>Organization:
>Environment:

>Description:
The declaration of a global 'operator new' causes the compiler to no longer recognize the standard 'new foo' syntax.
>How-To-Repeat:
int main() {
void* operator new(unsigned s, int* p);
int i;
int* e = new(&i) int;
int* f = new int;
return 0;
}
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


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