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

igodard@rational.com igodard@rational.com
Mon Apr 9 09:06:00 GMT 2001


>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:



More information about the Gcc-bugs mailing list