compiler: don't create set constants from arrays with high bound > 255 if elements of array are lower than 255

git-svn-id: trunk@17372 -
This commit is contained in:
paul 2011-04-26 00:17:14 +00:00
parent 1bcc41c8c6
commit 901a9a974e

View File

@ -365,8 +365,7 @@ implementation
constsetlo:=tenumdef(def).min;
{ for constant set elements, delphi allows the usage of elements of enumerations which
have value>255 if there is no element with a value > 255 used }
if (maybetruncenumrange) and
(m_delphi in current_settings.modeswitches) then
if (maybetruncenumrange) then
begin
if constsethi>255 then
constsethi:=255;