LUFA Library  130901
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
CompilerSpecific.h File Reference

Compiler specific definitions for code optimization and correctness. More...

Macros

#define GCC_FORCE_POINTER_ACCESS(StructPtr)   __asm__ __volatile__("" : "=b" (StructPtr) : "0" (StructPtr))
 
#define GCC_IS_COMPILE_CONST(x)   __builtin_constant_p(x)
 
#define GCC_MEMORY_BARRIER()   __asm__ __volatile__("" ::: "memory");
 

Detailed Description

Compiler specific definitions to expose certain compiler features which may increase the level of code optimization for a specific compiler, or correct certain issues that may be present such as memory barriers for use in conjunction with atomic variable access.

Where possible, on alternative compilers, these macros will either have no effect, or default to returning a sane value so that they can be used in existing code without the need for extra compiler checks in the user application code.

Note
Do not include this file directly, rather include the Common.h header file instead to gain this file's functionality.