2021-06-17 12:48:52 +00:00
|
|
|
/*
|
|
|
|
* PROJECT: ReactOS PSDK
|
|
|
|
* LICENSE: MIT (https://spdx.org/licenses/MIT)
|
|
|
|
* PURPOSE: Standard Annotation Language (SAL) definitions - GCC overrides
|
|
|
|
* COPYRIGHT: 2021 - Jérôme Gardou
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#ifndef __GNUC__
|
|
|
|
#error "Not for your compiler!"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef __has_attribute
|
|
|
|
#pragma GCC warning "GCC without __has_attribute, no SAL niceties for you"
|
|
|
|
#define __has_attribute(__x) 0
|
|
|
|
#endif
|
|
|
|
|
2024-10-13 08:31:24 +00:00
|
|
|
#ifndef _GCC_NO_SAL_ATTRIIBUTES
|
2021-06-17 12:48:52 +00:00
|
|
|
#if __has_attribute(warn_unused_result)
|
|
|
|
# undef _Must_inspect_result_
|
2021-06-22 08:57:06 +00:00
|
|
|
/* FIXME: Not really equivalent */
|
2021-06-17 12:48:52 +00:00
|
|
|
# define _Must_inspect_result_ __attribute__((__warn_unused_result__))
|
2021-06-22 08:57:06 +00:00
|
|
|
# undef _Check_return_
|
|
|
|
/* This one is 1:1 equivalent */
|
|
|
|
# define _Check_return_ __attribute__((__warn_unused_result__))
|
2021-06-17 12:48:52 +00:00
|
|
|
#endif
|
2024-10-13 08:31:24 +00:00
|
|
|
#endif // _GCC_NO_SAL_ATTRIIBUTES
|