]> git.donarmstrong.com Git - tmk_firmware.git/commitdiff
Fix for 'unnamed field in initializer' GCC bug(Fix #143)
authortmk <nobody@nowhere>
Fri, 14 Nov 2014 08:46:07 +0000 (17:46 +0900)
committertmk <nobody@nowhere>
Fri, 14 Nov 2014 08:49:48 +0000 (17:49 +0900)
common/debug.c

index c4fa3a05b4a7284f41b701e94563523e51cc56e4..2ed1006c5a761c95aa4cde8cf6987da9b86fcb2f 100644 (file)
@@ -1,12 +1,15 @@
 #include <stdbool.h>
 #include "debug.h"
 
+#define GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
 
-//debug_config_t debug_config = { .enable = false, .matrix = false };
 debug_config_t debug_config = {
+#if GCC_VERSION >= 40600
+    /* GCC Bug 10676 - Using unnamed fields in initializers
+     * https://gcc.gnu.org/bugzilla/show_bug.cgi?id=10676 */
     .enable = false,
     .matrix = false,
     .keyboard = false,
     .mouse = false,
+#endif
 };
-