X-Git-Url: http://cloudbase.mooo.com/gitweb/z180-stamp.git/blobdiff_plain/0c728c8de88d86247d2a75348e71f5af37838c28..c3ce66a888beadf2a6d524101dd009d5acd452ae:/include/common.h?ds=sidebyside diff --git a/include/common.h b/include/common.h index 10c4417..e22b7a1 100644 --- a/include/common.h +++ b/include/common.h @@ -1,12 +1,17 @@ /* * (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__) + #ifdef __AVR__ #include #include @@ -27,17 +32,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