Project not found: openSUSE:Factory:Staging:adi:19

File rename-constexpr.patch of Package worldofpadman

commit 73c54745deab780a93c576ae7aeefba339c4e407
Author: Bernhard M. Wiedemann <bwiedemann@suse.de>
Date:   Tue Dec 9 10:05:38 2025 +0100

    Avoid constexpr reserved word

diff --git a/code/tools/lcc/src/c.h b/code/tools/lcc/src/c.h
index dc57da8..5d19252 100644
--- a/code/tools/lcc/src/c.h
+++ b/code/tools/lcc/src/c.h
@@ -523,7 +523,7 @@ extern int process(char *);
 extern int findfunc(char *, char *);
 extern int findcount(char *, int, int);
 
-extern Tree constexpr(int);
+extern Tree constexprx(int);
 extern int intexpr(int, int);
 extern Tree simplify(int, Type, Tree, Tree);
 extern int ispow2(unsigned long u);
diff --git a/code/tools/lcc/src/init.c b/code/tools/lcc/src/init.c
index 64d73d3..f0ef6bc 100644
--- a/code/tools/lcc/src/init.c
+++ b/code/tools/lcc/src/init.c
@@ -190,7 +190,7 @@ static int initstruct(int len, Type ty, int lev) {
 	return n;
 }
 
-/* initializer - constexpr | { constexpr ( , constexpr )* [ , ] } */
+/* initializer - constexprx | { constexprx ( , constexprx )* [ , ] } */
 Type initializer(Type ty, int lev) {
 	int n = 0;
 	Tree e;
diff --git a/code/tools/lcc/src/simp.c b/code/tools/lcc/src/simp.c
index 9f4e3ec..8572396 100644
--- a/code/tools/lcc/src/simp.c
+++ b/code/tools/lcc/src/simp.c
@@ -167,7 +167,7 @@ static int subi(long x, long y, long min, long max, int needconst) {
 static int subd(double x, double y, double min, double max, int needconst) {
 	return addd(x, -y, min, max, needconst);
 }
-Tree constexpr(int tok) {
+Tree constexprx(int tok) {
 	Tree p;
 
 	needconst++;
@@ -177,7 +177,7 @@ Tree constexpr(int tok) {
 }
 
 int intexpr(int tok, int n) {
-	Tree p = constexpr(tok);
+	Tree p = constexprx(tok);
 
 	needconst++;
 	if (p->op == CNST + I || p->op == CNST + U)
diff --git a/code/tools/lcc/src/stmt.c b/code/tools/lcc/src/stmt.c
index fe83e21..c538aca 100644
--- a/code/tools/lcc/src/stmt.c
+++ b/code/tools/lcc/src/stmt.c
@@ -128,7 +128,7 @@ void statement(int loop, Swtch swp, int lev) {
 			static char stop[] = {IF, ID, 0};
 			Tree p;
 			t = gettok();
-			p = constexpr(0);
+			p = constexprx(0);
 			if (generic(p->op) == CNST && isint(p->type)) {
 				if (swp) {
 					needconst++;
openSUSE Build Service is sponsored by