ispc: upgrade 1.21.1 -> 1.22.0

Release notes:
https://github.com/ispc/ispc/releases/tag/v1.22.0

Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
This commit is contained in:
Naveen Saini 2023-11-30 10:56:05 +08:00 committed by Anuj Mittal
parent 6d3614337c
commit df5a450118
2 changed files with 54 additions and 2 deletions

View File

@ -0,0 +1,51 @@
From 1d1b0f4eacb7d3875d7dd53e2df8dfca2031fa3a Mon Sep 17 00:00:00 2001
From: Aleksei Nurmukhametov <aleksei.nurmukhametov@intel.com>
Date: Tue, 28 Nov 2023 04:11:44 -0800
Subject: [PATCH] Fix return type of lParseOperator
When bison is used in -y mode that emulates POSIX Yacc, tokens are
defined as enums (under YYTOKENTYPE ifdef) or as int via macro
definitions. Defining return type as yytokentype causes compile error:
invalid conversion from 'int' to 'yytokentype'. To avoid it, return int
as we do with lParseInteger and lParseFP.
Upstream-Status: Submitted [https://github.com/ispc/ispc/pull/2709]
Signed-off-by: Aleksei Nurmukhametov <aleksei.nurmukhametov@intel.com>
Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
---
src/lex.ll | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/lex.ll b/src/lex.ll
index f9e47578..0279831d 100644
--- a/src/lex.ll
+++ b/src/lex.ll
@@ -20,6 +20,7 @@ using namespace ispc;
static uint64_t lParseBinary(const char *ptr, SourcePos pos, char **endPtr);
static int lParseInteger(bool dotdotdot);
static int lParseFP();
+static int lParseOperator(const char *ptr);
static void lCComment(SourcePos *);
static void lCppComment(SourcePos *);
static void lNextValidChar(SourcePos *, char const*&);
@@ -29,7 +30,6 @@ static bool lConsumePragma(YYSTYPE *, SourcePos *);
static void lHandleCppHash(SourcePos *);
static void lStringConst(YYSTYPE *, SourcePos *);
static double lParseHexFloat(const char *ptr);
-static yytokentype lParseOperator(const char *ptr);
extern const char *RegisterDependency(const std::string &fileName);
#define YY_USER_ACTION \
@@ -1162,7 +1162,7 @@ lParseHexFloat(const char *ptr) {
/** Parse an operator.
*/
-static yytokentype
+static int
lParseOperator(const char *ptr) {
yylval.stringVal = new std::string(ptr);
if (m->symbolTable->LookupFunctionTemplate(yytext))
--
2.37.3

View File

@ -11,14 +11,15 @@ inherit cmake python3native ptest
S = "${WORKDIR}/git"
SRC_URI = "git://github.com/ispc/ispc.git;protocol=https;branch=releases/1.21.x \
SRC_URI = "git://github.com/ispc/ispc.git;protocol=https;branch=main \
file://0002-cmake-don-t-build-for-32-bit-targets.patch \
file://0001-Fix-QA-Issues.patch \
file://0001-Add-print-function-to-print-test-run-status-in-ptest.patch \
file://0001-Fix-return-type-of-lParseOperator.patch \
file://run-ptest \
"
SRCREV = "a0e8e48169f35a129941475c7023920e968dbc31"
SRCREV = "bd2c42d42e0cc3da1baf92160b82d4dc820a02ee"
COMPATIBLE_HOST = '(x86_64).*-linux'