X-Git-Url: http://cloudbase.mooo.com/gitweb/z180-stamp.git/blobdiff_plain/1157e75889d3d6d23d1e2514f401cd5b354bd149..93ea25f2ec6e99ef5ba3068112eafab265087089:/include/common.h?ds=sidebyside diff --git a/include/common.h b/include/common.h index 10c4417..1064bf3 100644 --- a/include/common.h +++ b/include/common.h @@ -1,12 +1,20 @@ /* * (C) Copyright 2014 Leo C. * - * SPDX-License-Identifier: GPL-2.0+ + * SPDX-License-Identifier: GPL-2.0 */ #ifndef COMMON_H #define COMMON_H +#include +#include + +#define GCC_VERSION (__GNUC__*10000 + __GNUC_MINOR__*100 + __GNUC_PATCHLEVEL__) + +#define USED __attribute__((used)) +#define UNUSED __attribute__((unused)) + #ifdef __AVR__ #include #include @@ -27,17 +35,18 @@ struct bits { #define SBIT(port,pin) ((*(volatile struct bits*)&port).b##pin) -//TODO: +//GCC bug PR61443 // Known to work: 4.8.4, 4.9.1 // Known to fail: 4.8.3, 4.9.0 + +#if (GCC_VERSION < 40804) || (GCC_VERSION == 40900) #define GCC_BUG_61443 1 +#endif /* PR61443 */ #else // TODO: stm32 #endif /* __AVR__ */ -#include - #ifdef __FLASH #define FLASH __flash #define MEMX __memx