Hi,
We have the below code where this warning gets generated.
#include
[[noreturn]] inline void
abc () noexcept
{
std::terminate ();
}
using MyNoReturn = void (*) () noexcept;
//using MyNoReturn = std::add_pointer_t<decltype(abc)>;
[[noreturn]]
inline void IDontReturn () noexcept
{
std::terminate ();
}
[[noreturn]]
inline void
CallIDontReturn () noexcept
{
gvar ();
}
We have the used the below command to compile:
clang++ -std=c++17 -Wall -o runusing usingst.cpp
gcc does not show this warning.
Please let us know how we can use ‘using’ clause to declare function pointer to a function that does not return, so that this warning does not show up.
Regards,
Manu