poco_bugcheck usage

A general discussion forum.
Posts: 1
Joined: 30 Sep 2011, 21:26

poco_bugcheck usage

Postby uho » 30 Sep 2011, 22:30

When using the poco_bugcheck and similar macros in a situation like the following:

int f()
if (something)
else if(something else)


you get a compiler warning C4715: ... not all control paths return a value (in MSVC, probably similar in other compilers)
This could be avoided without having to change any client code by using __declspec(noreturn) (for MSVC, __attribute__ ((noreturn)) for GCC) like this:

#if defined(_MSC_VER)
static void __declspec(noreturn) bugcheck(const char* file, int line);
I wonder if this has been intentionally left out?

Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 0 guests