Skip to content

Commit d9f500b

Browse files
committed
Don't count function arguments passed by const reference as modified
1 parent f4b9e92 commit d9f500b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

source/compiler/sc3.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2402,9 +2402,9 @@ static int nesting=0;
24022402
check_tagmismatch_multiple(arg[argidx].tags,arg[argidx].numtags,lval.tag,-1);
24032403
if (lval.tag!=0)
24042404
append_constval(&taglst,arg[argidx].name,lval.tag,0);
2405-
argidx++; /* argument done */
2406-
if (lval.sym!=NULL)
2405+
if (lval.sym!=NULL && (arg[argidx].usage & uCONST)==0)
24072406
markusage(lval.sym,uWRITTEN);
2407+
argidx++; /* argument done */
24082408
break;
24092409
case iREFARRAY:
24102410
if (lval.ident!=iARRAY && lval.ident!=iREFARRAY

0 commit comments

Comments
 (0)