Skip to contentSkip to conversation

mcpp: Stick to C17

PATCH In review [email protected] 2 participants 2 messages Apr 1, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mcpp: Stick to C17

From: "mark.yang" <[email protected]>

* Fix build error with gcc-15 by renaming goto labels
see more details:
http://errors.yoctoproject.org/Errors/Details/850149/
../../mcpp-2.7.2/src/system.c:3436:15: error: expected identifier or '*' before 'true'

true, false are reserved keywords in gcc-15
Rename goto 'labels' from 'ture' to 'true_label', from 'false' 'false_label' to avoid conflicts.

---
 meta-oe/recipes-devtools/mcpp/mcpp_2.7.2.bb | 4 ++++
 1 file changed, 4 insertions(+)
meta-oe/recipes-devtools/mcpp/mcpp_2.7.2.bb +4 -0
index 0c1815732f..dfa77770a7 100644
@@ -21,3 +21,7 @@ BBCLASSEXTEND = "native nativesdk"
 # http://errors.yoctoproject.org/Errors/Details/766883/
 # mcpp-2.7.2/src/expand.c:713:21: error: assignment to 'char *' from incompatible pointer type 'LOCATION *' {aka 'struct location *'} [-Wincompatible-pointer-types]
 CFLAGS += "-Wno-error=incompatible-pointer-types"
+
+# http://errors.yoctoproject.org/Errors/Details/850149/
+# ../../mcpp-2.7.2/src/system.c:3436:15: error: expected identifier or '*' before 'true'
+CFLAGS += "-std=gnu17"
Signature · 1 line
2.34.1
#1 lore raw
Quoted 10 lines · mark.yang via lists.openembedded.org

From: "mark.yang" <[email protected]>

* Fix build error with gcc-15 by renaming goto labels
see more details:
http://errors.yoctoproject.org/Errors/Details/850149/
../../mcpp-2.7.2/src/system.c:3436:15: error: expected identifier or '*' before 'true'

true, false are reserved keywords in gcc-15
Rename goto 'labels' from 'ture' to 'true_label', from 'false' 'false_label' to avoid conflicts.

It might be worth using true/false conditionally e.g. see
https://git.openembedded.org/openembedded-core/tree/meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-libext2fs-fix-std-c23-build-failure.patch

Quoted 30 lines
---
 meta-oe/recipes-devtools/mcpp/mcpp_2.7.2.bb | 4 ++++
 1 file changed, 4 insertions(+)
meta-oe/recipes-devtools/mcpp/mcpp_2.7.2.bb +4 -1
index 0c1815732f..dfa77770a7 100644
@@ -21,3 +21,7 @@ BBCLASSEXTEND = "native nativesdk"
 # http://errors.yoctoproject.org/Errors/Details/766883/
 # mcpp-2.7.2/src/expand.c:713:21: error: assignment to 'char *' from incompatible pointer type 'LOCATION *' {aka 'struct location *'} [-Wincompatible-pointer-types]
 CFLAGS += "-Wno-error=incompatible-pointer-types"
+
+# http://errors.yoctoproject.org/Errors/Details/850149/
+# ../../mcpp-2.7.2/src/system.c:3436:15: error: expected identifier or '*' before 'true'
+CFLAGS += "-std=gnu17"
--

2.34.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#116470): https://lists.openembedded.org/g/openembedded-devel/message/116470
Mute This Topic: https://lists.openembedded.org/mt/112022139/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-