Closed erique closed 9 months ago
can't reproduce:
was on amiga13.1 ...
btw: you are not overloading the operator, that's a redefinition.
btw: you are not overloading the operator, that's a redefinition.
well, you're not wrong, but it is usually referred to as "global operator new/delete overloading" (says google :shrug: )
terminology aside - it seems to work now, thanks!
Considering the program
When built using
-fno-exceptions
results in multiple definitions ofoperator new
, likeIf compiled without
-fno-exceptions
it succeeds and the resulting executable runs as expected.Not sure if it's related, but,
_GLIBCXX_WEAK_DEFINITION
is "empty" when thenew()
implementation is compiled here https://github.com/bebbo/gcc/blob/287b715467ef4ef2bdca622471eb45707b4d110c/libstdc%2B%2B-v3/libsupc%2B%2B/new_op.cc#L41-L42(symbol type is
T
and notW
)