https://bitbucket.org/daniel_fort/magic-lantern
Raw File
Tip revision: f2f5ecdb767db1d46bf24c4c9145e15a5859954d authored by hudson@kremvax on 18 June 2009, 01:58:04 UTC
Bump version and added install target
Tip revision: f2f5ecd
compiler.h
#ifndef _compiler_h_
#define _compiler_h_

/** \file
 * gcc specific hacks and defines.
 *
 * Both host and ARM.
 */

/** Compile time failure if a structure is not sized correctly */
#define SIZE_CHECK_STRUCT( struct_name, size ) \
	static uint8_t __attribute__((unused)) \
	__size_check_##struct_name[ \
		sizeof( struct struct_name ) == size ? 0 : -1 \
	]

/** Force a variable to live in the text segment */
#define TEXT __attribute__((section(".text")))


#endif
back to top