This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
It may be viewed as a low priority regression. In gcc-3.2 std::allocatorWell, it depends on the allocator you select at library build time: for instance, the equivalent allocator in mainline (pool) or the default (mt) also don't call new(0).
does not behave this way.
I agree that calling new(0) is dumb and we should simply standardize on the behavior of pool and mt: it's just a matter of adding a conditional to new_allocator, seems safe for 3.4.4 too. Please file a PR, thanks.Is it possible/reasonable to change new_allocator::allocate such that it returns NULL when __n ==0 ? Should I open a PR against libstdc++?
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |