Fix build with C23 compiler#207
Open
dinuxbg wants to merge 1 commit intoembench:embench-2.0-branchfrom
Open
Conversation
Fix GCC build when using -std=gnu23 option. Signed-off-by: Dimitar Dimitrov <dimitar@dinux.eu>
dinuxbg
pushed a commit
to dinuxbg/gnupru
that referenced
this pull request
May 4, 2025
Workaround for embench/embench-iot#207 Signed-off-by: Dimitar Dimitrov <dimitar@dinux.eu>
|
I hit the same issue. Can confirm this fix works. An alternative is to just use diff --git a/src/wikisort/libwikisort.c b/src/wikisort/libwikisort.c
index 4bdc701..3810f88 100644
--- a/src/wikisort/libwikisort.c
+++ b/src/wikisort/libwikisort.c
@@ -28,13 +28,7 @@
#include <string.h>
#include <math.h>
#include <limits.h>
-
-/* various #defines for the C code */
-#ifndef true
-#define true 1
-#define false 0
-typedef uint8_t bool;
-#endif
+#include <stdbool.h>
#define Var(name, value, type) type name = valueWithout one of these patches, this benchmark fails to compile by default on GCC 15 (where C23 is the default version now). |
Wren6991
added a commit
to Wren6991/embench-iot
that referenced
this pull request
Sep 24, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix GCC build when using -std=gnu23 option.