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++/1779: operator new with wrong argument type crashes compiler



>Number:         1779
>Category:       c++
>Synopsis:       operator new with wrong argument type crashes compiler
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          ice-on-illegal-code
>Submitter-Id:   net
>Arrival-Date:   Fri Jan 26 06:26:01 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     Volker Reichelt
>Release:        gcc version 2.96.20000920 on IRIX 6.5
>Organization:
>Environment:
IRIX 6.5 on SGI O2 with MIPS R5000 processor
>Description:
A wrong argument type for "new" in a class/struct like

struct Bogus { void* operator new(char); };

causes an ICE:

NewBug.cpp:1: `operator new' takes type `size_t' as first parameter
NewBug.cpp:1: Internal error #73.
NewBug.cpp:1: Internal compiler error in , at cp/method.c:1461
>How-To-Repeat:
g++ -c NewBug.cpp
(assuming the single code line is stored in a
file "NewBug.cpp")
>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]