expand support for noreturn declarations
Although gcc specifies support for declaring a function as noreturn after the function name and parameters, other compilers do so via an attribute at the start of the declaration. Add some macro support for the attribute-at-the-beginning method: o MS Visual Studio compiler o Upcoming C23 standard (untested at this point)
This commit is contained in:
@@ -145,6 +145,8 @@ l_selection_clone(lua_State *L)
|
||||
return 1;
|
||||
}
|
||||
|
||||
DISABLE_WARNING_UNREACHABLE_CODE
|
||||
|
||||
/* selection.set(sel, x, y); */
|
||||
/* selection.set(sel, x, y, value); */
|
||||
/* local sel = selection.set(); */
|
||||
@@ -207,6 +209,7 @@ l_selection_getpoint(lua_State *L)
|
||||
lua_remove(L, 1); /* sel */
|
||||
if (!nhl_get_xy_params(L, &ix, &iy)) {
|
||||
nhl_error(L, "l_selection_getpoint: Incorrect params");
|
||||
/*NOTREACHED*/
|
||||
return 0;
|
||||
}
|
||||
x = (coordxy) ix;
|
||||
@@ -224,6 +227,8 @@ l_selection_getpoint(lua_State *L)
|
||||
return 1;
|
||||
}
|
||||
|
||||
RESTORE_WARNING_UNREACHABLE_CODE
|
||||
|
||||
/* local s = selection.negate(sel); */
|
||||
/* local s = selection.negate(); */
|
||||
/* local s = sel:negate(); */
|
||||
|
||||
Reference in New Issue
Block a user