diff --git a/Symbol.pas b/Symbol.pas index f87fbea..e5069bd 100644 --- a/Symbol.pas +++ b/Symbol.pas @@ -449,20 +449,21 @@ for i := 0 to hashSize do begin while sp <> nil do begin if sp^.storage = private then if sp^.itype^.kind = functionType then - if sp^.state <> defined then begin - numErrors := numErrors+1; - new(msg); - msg^ := concat('The static function ', sp^.name^, - ' was not defined.'); - writeln('*** ', msg^); - if terminalErrors then begin - if enterEditor then - ExitToEditor(msg, ord4(firstPtr)-ord4(bofPtr)) - else - TermError(0); + if sp^.state <> defined then + if sp^.used then begin + numErrors := numErrors+1; + new(msg); + msg^ := concat('The static function ', sp^.name^, + ' was used but never defined.'); + writeln('*** ', msg^); + if terminalErrors then begin + if enterEditor then + ExitToEditor(msg, ord4(firstPtr)-ord4(bofPtr)) + else + TermError(0); + end; {if} + liDCBGS.merrf := 16; end; {if} - liDCBGS.merrf := 16; - end; {if} sp := sp^.next; end; {while} end; {for} diff --git a/cc.notes b/cc.notes index e67093f..0a8c713 100644 --- a/cc.notes +++ b/cc.notes @@ -2063,6 +2063,8 @@ int foo(int[42]); 229. Each time a CDev written with ORCA/C was opened and closed, it would leak a user ID. If it was opened and closed many times, the system could run out of user IDs of the appropriate type, potentially causing problems. To avoid this, new cleanup code has been added that runs when a CDev is closed. To ensure this code gets run, CDevs written with ORCA/C should always set the wantClose flag so that they receive CloseCDEV messages, even if they do not otherwise need them. +230. It should be allowed to declare a static function that is never defined, provided that the function is also never used in an expression. + -- Bugs from C 2.1.0 that have been fixed ----------------------------------- 1. In some situations, fread() reread the first 1K or so of the file.