diff options
Diffstat (limited to 'dynamic-layers/openembedded-layer/recipes-core/ispc/ispc/0001-Fix-return-type-of-lParseOperator.patch')
-rw-r--r-- | dynamic-layers/openembedded-layer/recipes-core/ispc/ispc/0001-Fix-return-type-of-lParseOperator.patch | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/dynamic-layers/openembedded-layer/recipes-core/ispc/ispc/0001-Fix-return-type-of-lParseOperator.patch b/dynamic-layers/openembedded-layer/recipes-core/ispc/ispc/0001-Fix-return-type-of-lParseOperator.patch new file mode 100644 index 00000000..6ef6cba1 --- /dev/null +++ b/dynamic-layers/openembedded-layer/recipes-core/ispc/ispc/0001-Fix-return-type-of-lParseOperator.patch | |||
@@ -0,0 +1,51 @@ | |||
1 | From 1d1b0f4eacb7d3875d7dd53e2df8dfca2031fa3a Mon Sep 17 00:00:00 2001 | ||
2 | From: Aleksei Nurmukhametov <aleksei.nurmukhametov@intel.com> | ||
3 | Date: Tue, 28 Nov 2023 04:11:44 -0800 | ||
4 | Subject: [PATCH] Fix return type of lParseOperator | ||
5 | |||
6 | When bison is used in -y mode that emulates POSIX Yacc, tokens are | ||
7 | defined as enums (under YYTOKENTYPE ifdef) or as int via macro | ||
8 | definitions. Defining return type as yytokentype causes compile error: | ||
9 | invalid conversion from 'int' to 'yytokentype'. To avoid it, return int | ||
10 | as we do with lParseInteger and lParseFP. | ||
11 | |||
12 | Upstream-Status: Submitted [https://github.com/ispc/ispc/pull/2709] | ||
13 | |||
14 | Signed-off-by: Aleksei Nurmukhametov <aleksei.nurmukhametov@intel.com> | ||
15 | Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com> | ||
16 | --- | ||
17 | src/lex.ll | 4 ++-- | ||
18 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
19 | |||
20 | diff --git a/src/lex.ll b/src/lex.ll | ||
21 | index f9e47578..0279831d 100644 | ||
22 | --- a/src/lex.ll | ||
23 | +++ b/src/lex.ll | ||
24 | @@ -20,6 +20,7 @@ using namespace ispc; | ||
25 | static uint64_t lParseBinary(const char *ptr, SourcePos pos, char **endPtr); | ||
26 | static int lParseInteger(bool dotdotdot); | ||
27 | static int lParseFP(); | ||
28 | +static int lParseOperator(const char *ptr); | ||
29 | static void lCComment(SourcePos *); | ||
30 | static void lCppComment(SourcePos *); | ||
31 | static void lNextValidChar(SourcePos *, char const*&); | ||
32 | @@ -29,7 +30,6 @@ static bool lConsumePragma(YYSTYPE *, SourcePos *); | ||
33 | static void lHandleCppHash(SourcePos *); | ||
34 | static void lStringConst(YYSTYPE *, SourcePos *); | ||
35 | static double lParseHexFloat(const char *ptr); | ||
36 | -static yytokentype lParseOperator(const char *ptr); | ||
37 | extern const char *RegisterDependency(const std::string &fileName); | ||
38 | |||
39 | #define YY_USER_ACTION \ | ||
40 | @@ -1162,7 +1162,7 @@ lParseHexFloat(const char *ptr) { | ||
41 | |||
42 | /** Parse an operator. | ||
43 | */ | ||
44 | -static yytokentype | ||
45 | +static int | ||
46 | lParseOperator(const char *ptr) { | ||
47 | yylval.stringVal = new std::string(ptr); | ||
48 | if (m->symbolTable->LookupFunctionTemplate(yytext)) | ||
49 | -- | ||
50 | 2.37.3 | ||
51 | |||