Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Diagnostics for detection of endless loops #634

Merged
merged 11 commits into from
May 2, 2021
Prev Previous commit
Next Next commit
Don't count function arguments passed by const reference as modified
  • Loading branch information
Daniel-Cortez committed May 2, 2021
commit 48c10791dbde8ccd3b9d05dc823035272976d461
4 changes: 2 additions & 2 deletions source/compiler/sc3.c
Original file line number Diff line number Diff line change
Expand Up @@ -2402,9 +2402,9 @@ static int nesting=0;
check_tagmismatch_multiple(arg[argidx].tags,arg[argidx].numtags,lval.tag,-1);
if (lval.tag!=0)
append_constval(&taglst,arg[argidx].name,lval.tag,0);
argidx++; /* argument done */
if (lval.sym!=NULL)
if (lval.sym!=NULL && (arg[argidx].usage & uCONST)==0)
markusage(lval.sym,uWRITTEN);
argidx++; /* argument done */
break;
case iREFARRAY:
if (lval.ident!=iARRAY && lval.ident!=iREFARRAY
Expand Down