sming_attr.h
Go to the documentation of this file.
1 /****
2  * Sming Framework Project - Open Source framework for high efficiency native ESP8266 development.
3  * Created 2015 by Skurydin Alexey
4  * http://github.com/SmingHub/Sming
5  * All files of the Sming Core are provided under the LGPL v3 license.
6  *
7  * sming_attr.h - low-level attribute definitions common to all architectures
8  *
9  ****/
10 
11 #pragma once
12 
13 #ifndef __forceinline
14 #define __forceinline __attribute__((always_inline)) inline
15 #endif
16 
17 #ifndef __noinline
18 #define __noinline __attribute__((noinline))
19 #endif
20 
21 // Weak attributes don't work for PE
22 #ifdef __WIN32
23 #define WEAK_ATTR
24 #else
25 #define WEAK_ATTR __attribute((weak))
26 #endif
27 
28 /*
29  * Use this definition in the cases where a function or a variable is meant to be possibly unused. GCC will not produce a warning for it.
30  */
31 #define SMING_UNUSED __attribute__((unused))
32 
33 /*
34  * Flags a compiler warning when Sming framework methods, functions or types are changed
35  */
36 #define SMING_DEPRECATED __attribute__((deprecated))