__throw_out_of_range_fmt defined in stdc++compat.cpp instead of throw_gcc.h

NEW
Assigned to

Status

()

Core
Build Config
2 years ago
2 years ago

People

(Reporter: lsalzman, Assigned: froydnj)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

2 years ago
stdc++compat.cpp defines __throw_out_of_range_fmt: https://dxr.mozilla.org/mozilla-central/source/build/unix/stdc++compat/stdc++compat.cpp#148

We should probably move this into memory/mozalloc/throw_gcc.h with all the other STL throw wrappers.
I tried doing this today and found:

/opt/build/froydnj/build-rust-mc/dist/include/mozilla/throw_gcc.h: In function ‘void std::__throw_out_of_range_fmt(const char*, ...)’:
/opt/build/froydnj/build-rust-mc/dist/include/mozilla/throw_gcc.h:130:1: error: function ‘void std::__throw_out_of_range_fmt(const char*, ...)’ can never be inlined because it uses variable argument lists
 __throw_out_of_range_fmt(char const* fmt, ...)

so we'd need to create a throw_gcc.cpp similar to our MSVC wrapper implementation.  At which point it seems like we almost might as well keep it in stdc++compat.cpp.  Or should we just implement throw_gcc.cpp?
Flags: needinfo?(mh+mozilla)
The latter, please.
Flags: needinfo?(mh+mozilla)
Assignee: nobody → nfroyd
You need to log in before you can comment on or make changes to this bug.