浏览代码

* let the dfa do the detection of unset function results if possible

git-svn-id: trunk@8156 -
florian 18 年之前
父节点
当前提交
8b11f99765
共有 1 个文件被更改,包括 3 次插入2 次删除
  1. 3 2
      compiler/symtable.pas

+ 3 - 2
compiler/symtable.pas

@@ -560,8 +560,9 @@ implementation
                 if (vo_is_funcret in tabstractvarsym(sym).varoptions) then
                   begin
                     { don't warn about the result of constructors }
-                    if (tsym(sym).owner.symtabletype<>localsymtable) or
-                       (tprocdef(tsym(sym).owner.defowner).proctypeoption<>potype_constructor) then
+                    if ((tsym(sym).owner.symtabletype<>localsymtable) or
+                       (tprocdef(tsym(sym).owner.defowner).proctypeoption<>potype_constructor)) and
+                       not(cs_opt_nodedfa in current_settings.optimizerswitches) then
                       MessagePos(tsym(sym).fileinfo,sym_w_function_result_not_set)
                   end
                 else if (tsym(sym).owner.symtabletype=parasymtable) then