fpc/tests/webtbs/tw34055.pp
Jonas Maebe 2a3eeab96d * support for constant char/bool/enum indices in typed constant
index expressions (mantis #34055)
  * prevent all indirect structure indexing instead of only
    ansi/wide/unicodestrings

git-svn-id: trunk@40010 -
2018-10-21 18:48:41 +00:00

25 lines
473 B
ObjectPascal

{$mode objfpc}
type
TDOS_FIELDNAMES = (
Dos_Signature, // ord = 0
Dos_OffsetToNewExecutable // ord = 1
);
const
DosFieldLabelsB : array[TDOS_FIELDNAMES]
of pwidechar =
(
'DOS signature',
'offset to new executable'
);
d : ppwidechar = @DosFieldLabelsB[Dos_OffsetToNewExecutable];
begin
if d<>@DosFieldLabelsB[Dos_OffsetToNewExecutable] then
halt(1);
end.