Skip to content

Commit

Permalink
Fix for 'unnamed field in initializer' GCC bug(Fix qmk#143)
Browse files Browse the repository at this point in the history
  • Loading branch information
yashikno committed Nov 14, 2014
1 parent 7b0b8ee commit 8180709
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions common/debug.c
Original file line number Diff line number Diff line change
@@ -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
};

0 comments on commit 8180709

Please sign in to comment.