瀏覽代碼

Avoid warning for function not set if noreturn modifier is used

git-svn-id: trunk@29710 -
pierre 10 年之前
父節點
當前提交
af883cdcb7
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      compiler/symtable.pas

+ 1 - 0
compiler/symtable.pas

@@ -712,6 +712,7 @@ implementation
                      { don't warn about the result of constructors }
                      if ((tsym(sym).owner.symtabletype<>localsymtable) or
                         (tprocdef(tsym(sym).owner.defowner).proctypeoption<>potype_constructor)) and
+                        not (po_noreturn in tprocdef(tsym(sym).owner.defowner).procoptions) and
                         not(cs_opt_nodedfa in current_settings.optimizerswitches) then
                        MessagePos(tsym(sym).fileinfo,sym_w_function_result_not_set)
                    end