diff options
| author | jvoisin | 2023-09-20 18:05:27 +0200 |
|---|---|---|
| committer | jvoisin | 2023-09-20 18:43:56 +0200 |
| commit | fd4332dbcd5227fde96e7bc128418d834b5b910f (patch) | |
| tree | 4b2fce2510a5a2ee189147b76ef937a1c568a090 /include/fortify-headers.h | |
| parent | d2594298b89d0fb8989cae3ebc8900e77b6aa478 (diff) | |
Add tests for compile-time errors
Diffstat (limited to 'include/fortify-headers.h')
| -rw-r--r-- | include/fortify-headers.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/fortify-headers.h b/include/fortify-headers.h index 3eaed7c..bc7bf00 100644 --- a/include/fortify-headers.h +++ b/include/fortify-headers.h | |||
| @@ -106,9 +106,9 @@ | |||
| 106 | #define __diagnose_as_builtin(...) | 106 | #define __diagnose_as_builtin(...) |
| 107 | #endif | 107 | #endif |
| 108 | 108 | ||
| 109 | #if __has_attribute (__diagnose_if) | 109 | #if __has_attribute (diagnose_if) |
| 110 | #define __warning_if(cond, msg) __attribute__ ((__diagnose_if (cond, msg, "warning"))) | 110 | #define __warning_if(cond, msg) __attribute__ ((diagnose_if (cond, msg, "warning"))) |
| 111 | #define __error_if(cond, msg) __attribute__ ((__diagnose_if (cond, msg, "error"))) | 111 | #define __error_if(cond, msg) __attribute__ ((diagnose_if (cond, msg, "error"))) |
| 112 | #else | 112 | #else |
| 113 | #define __warning_if(cond, msg) | 113 | #define __warning_if(cond, msg) |
| 114 | #define __error_if(cond, msg) | 114 | #define __error_if(cond, msg) |
