ned14 / status-code

Proposed SG14 status_code for the C++ standard
Other
64 stars 13 forks source link

"'noreturn' function does return" warning for indirecting_domain::_do_throw_exception #36

Closed lzhangzz closed 3 years ago

lzhangzz commented 3 years ago

Getting an "'noreturn' function does return" warning for the function

https://github.com/ned14/status-code/blob/bdc421ff3d046b2bea0268fe811ba0b0eee89504/include/status_code_ptr.hpp#L91

Shall we insert an abort() for it?

ned14 commented 3 years ago

There is annoying bug in some versions of GCC where virtual functions and the noreturn attribute don't seem to work well together. They fixed it in newer GCCs, and clang and MSVC never had the problem.

Does inserting an abort here fix the warning for you?

lzhangzz commented 3 years ago

Does inserting an abort here fix the warning for you?

Yes

ned14 commented 3 years ago

Thanks for the BR!