Warn about float constants that can't be represented in globals. Also don't duplicate the globals warnings.

This commit is contained in:
Sei Lisa 2015-03-06 23:26:58 +01:00
parent c1d837674c
commit 59cdd64228
2 changed files with 16 additions and 7 deletions

View file

@ -82,7 +82,7 @@ class optimizer(foldconst, renamer, deadcode):
self.globalmode = False
if self.constfold:
self.FoldScript()
self.FoldScript(warningpass=False)
if self.dcr:
self.RemoveDeadCode()
@ -90,7 +90,7 @@ class optimizer(foldconst, renamer, deadcode):
# Make another fold pass, since RemoveDeadCode can embed expressions
# into other expressions and generate unoptimized code.
if self.constfold:
self.FoldScript()
self.FoldScript(warningpass=True)
if self.shrinknames:
self.ShrinkNames()