mirror of
https://github.com/byteworksinc/ORCA-C.git
synced 2025-03-12 13:31:38 +00:00
Avoid spurious undefined variable errors for functions returning structs/unions.
When the lint check for undefined variables was enabled, a "lint: unused variable: @struct" would be produced for any function returning a struct or union, due to the special static variable that is created to hold the return value. That spurious lint message is now suppressed.
This commit is contained in:
parent
20f9170343
commit
e5c7aebb3f
@ -489,9 +489,11 @@ if not tPtr^.isEmpty or not tPtr^.noStatics then
|
||||
if not (ip^.itype^.kind in [functionType,enumConst]) then
|
||||
if ip^.storage = private then
|
||||
if copy(ip^.name^,1,staticNumLen) = tPtr^.staticNum then
|
||||
if not (ip^.name^[staticNumLen+1] in ['~','@']) then
|
||||
begin
|
||||
new(nameStr);
|
||||
nameStr^ := copy(ip^.name^, staticNumLen+1, maxint);
|
||||
nameStr^ :=
|
||||
copy(ip^.name^, staticNumLen+1, maxint);
|
||||
ErrorWithExtraString(185, nameStr);
|
||||
end; {if}
|
||||
ip := ip^.next;
|
||||
|
Loading…
x
Reference in New Issue
Block a user