]> cloudbase.mooo.com Git - z180-stamp.git/commitdiff
Set GCC_BUG_61443 macro automatically for the affected GCC versions.
authorLeo C <erbl259-lmu@yahoo.de>
Thu, 25 Aug 2016 10:01:09 +0000 (12:01 +0200)
committerLeo C <erbl259-lmu@yahoo.de>
Thu, 25 Aug 2016 10:01:09 +0000 (12:01 +0200)
include/common.h

index dea638aa7d0261f808890992a4065a4d30317e85..e22b7a158316bbb9c94f39c9a5bac6da272a40ca 100644 (file)
@@ -10,6 +10,8 @@
 #include <stdio.h>
 #include <stdint.h>
 
+#define GCC_VERSION (__GNUC__*10000 + __GNUC_MINOR__*100 + __GNUC_PATCHLEVEL__)
+
 #ifdef __AVR__
 #include <avr/io.h>
 #include <avr/pgmspace.h>
@@ -30,10 +32,13 @@ 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