[ovs-dev] [PATCH] compiler: Define NO_RETURN for MSVC.
Ben Pfaff
blp at nicira.com
Mon Sep 15 21:58:08 UTC 2014
On Mon, Sep 15, 2014 at 01:48:15PM -0700, Gurucharan Shetty wrote:
> To prevent warnings such as "Not all control paths return a value",
> we should define NO_RETURN for MSVC.
>
> Currently for gcc, we add NO_RETURN at the end of function declaration.
> But for MSVC, "__declspec(noreturn)" is needed at the beginning of function
> declaration. So this commit moves NO_RETURN to the beginning of the function
> declaration as it works with gcc and clang too.
>
> Signed-off-by: Gurucharan Shetty <gshetty at nicira.com>
Will you add a note above the definition of NO_RETURN that says it has
to come first to make MSVC happy?
Acked-by: Ben Pfaff <blp at nicira.com>
More information about the dev
mailing list