Fossil SCM
Define the NORETURN macro for MSVC
Commit
a99c9ffec2cf627d2534e472238b700a084e8a2f2163d84a33440fc3bd20cf67
Parent
f21820f4abbeada…
1 file changed
+2
+2
| --- src/config.h | ||
| +++ src/config.h | ||
| @@ -229,10 +229,12 @@ | ||
| 229 | 229 | /* |
| 230 | 230 | ** A marker for functions that never return. |
| 231 | 231 | */ |
| 232 | 232 | #if defined(__GNUC__) || defined(__clang__) |
| 233 | 233 | # define NORETURN __attribute__((__noreturn__)) |
| 234 | +#elif defined(_MSC_VER) | |
| 235 | +# define NORETURN __declspec(noreturn) | |
| 234 | 236 | #else |
| 235 | 237 | # define NORETURN |
| 236 | 238 | #endif |
| 237 | 239 | |
| 238 | 240 | /* |
| 239 | 241 |
| --- src/config.h | |
| +++ src/config.h | |
| @@ -229,10 +229,12 @@ | |
| 229 | /* |
| 230 | ** A marker for functions that never return. |
| 231 | */ |
| 232 | #if defined(__GNUC__) || defined(__clang__) |
| 233 | # define NORETURN __attribute__((__noreturn__)) |
| 234 | #else |
| 235 | # define NORETURN |
| 236 | #endif |
| 237 | |
| 238 | /* |
| 239 |
| --- src/config.h | |
| +++ src/config.h | |
| @@ -229,10 +229,12 @@ | |
| 229 | /* |
| 230 | ** A marker for functions that never return. |
| 231 | */ |
| 232 | #if defined(__GNUC__) || defined(__clang__) |
| 233 | # define NORETURN __attribute__((__noreturn__)) |
| 234 | #elif defined(_MSC_VER) |
| 235 | # define NORETURN __declspec(noreturn) |
| 236 | #else |
| 237 | # define NORETURN |
| 238 | #endif |
| 239 | |
| 240 | /* |
| 241 |