Skip to content

Commit 46eb732

Browse files
committed
Expect __pragma before the tag in function/variable declarations
1 parent 933ed40 commit 46eb732

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

source/compiler/sc1.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1993,6 +1993,9 @@ static void declfuncvar(int fpublic,int fstatic,int fstock,int fconst)
19931993
cell val;
19941994
int invalidfunc;
19951995

1996+
if (matchtoken(t__PRAGMA))
1997+
dopragma();
1998+
19961999
tag=pc_addtag(NULL);
19972000
tok=lex(&val,&str);
19982001
/* if we arrived here, this may not be a declaration of a native function
@@ -2003,11 +2006,6 @@ static void declfuncvar(int fpublic,int fstatic,int fstock,int fconst)
20032006
return;
20042007
} /* if */
20052008

2006-
if (tok==t__PRAGMA) {
2007-
dopragma();
2008-
tok=lex(&val,&str);
2009-
} /* if */
2010-
20112009
if (tok!=tSYMBOL && tok!=tOPERATOR) {
20122010
lexpush();
20132011
needtoken(tSYMBOL);

0 commit comments

Comments
 (0)