fpc/tests/webtbf/tw35753.pp
Jonas Maebe c038e4c3f2 * relaxation of r42272: again only show warnings rather than errors for
out-of-range constants, because of the comments mentioned in #35753
    (except for enums, as apparently Delphi does the same)
  * added range check warnings about explicit type casts that throw away
    bits (e.g. byte($fff)), without giving warnings for most common cases
    (like cardinal(-1))
  * fixed masking/sign exting constant array indices (must be based on index
    range type size/signedness rather than on array size/"signedness")

git-svn-id: trunk@42275 -
2019-06-23 14:12:33 +00:00

13 lines
211 B
ObjectPascal

{ %fail }
{ %OPT=-vw -Sew }
type
TRegister = (
TRegisterLowEnum := Low(longint),
TRegisterHighEnum := High(longint)
);
const
NR_INVALID = tregister($fffffffff);
begin
end.