Skip to content
This repository was archived by the owner on Sep 26, 2025. It is now read-only.

Commit 4fe6f1d

Browse files
committed
Fix "recovery" from parsing a syntactically incorrect constant declaration.
1 parent 8ee4bee commit 4fe6f1d

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

CMakeLists.txt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
#build file for CMake, see http://www.cmake.org/
2-
3-
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
4-
PROJECT(pawn)
5-
6-
ADD_SUBDIRECTORY(./compiler)
7-
ADD_SUBDIRECTORY(./amx)
1+
#build file for CMake, see http://www.cmake.org/
2+
3+
CMAKE_MINIMUM_REQUIRED(VERSION 3.0)
4+
PROJECT(pawn)
5+
6+
ADD_SUBDIRECTORY(./compiler)
7+
ADD_SUBDIRECTORY(./amx)

compiler/sc1.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5998,6 +5998,7 @@ SC_FUNC int constexpr(cell *val,int *tag,symbol **symptr)
59985998
stgset(FALSE); /* stop stage-buffering */
59995999
if (ident!=iCONSTEXPR) {
60006000
error(8); /* must be constant expression */
6001+
litidx=0; /* clear the literal pool */
60016002
if (val!=NULL)
60026003
*val=0;
60036004
if (tag!=NULL)

0 commit comments

Comments
 (0)