mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-21 03:29:19 +02:00
* fixed wrong note about explictly valued enumeration types if the lower
bound is <= -1 git-svn-id: trunk@4182 -
This commit is contained in:
parent
30ee3416e8
commit
a12f293781
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -5763,6 +5763,7 @@ tests/tbs/tb0498.pp svneol=native#text/plain
|
|||||||
tests/tbs/tb0499.pp svneol=native#text/plain
|
tests/tbs/tb0499.pp svneol=native#text/plain
|
||||||
tests/tbs/tb0500.pp svneol=native#text/plain
|
tests/tbs/tb0500.pp svneol=native#text/plain
|
||||||
tests/tbs/tb0501.pp svneol=native#text/plain
|
tests/tbs/tb0501.pp svneol=native#text/plain
|
||||||
|
tests/tbs/tb0502.pp svneol=native#text/plain
|
||||||
tests/tbs/ub0060.pp svneol=native#text/plain
|
tests/tbs/ub0060.pp svneol=native#text/plain
|
||||||
tests/tbs/ub0069.pp svneol=native#text/plain
|
tests/tbs/ub0069.pp svneol=native#text/plain
|
||||||
tests/tbs/ub0119.pp svneol=native#text/plain
|
tests/tbs/ub0119.pp svneol=native#text/plain
|
||||||
|
@ -590,7 +590,7 @@ implementation
|
|||||||
p : tnode;
|
p : tnode;
|
||||||
pd : tabstractprocdef;
|
pd : tabstractprocdef;
|
||||||
is_func,
|
is_func,
|
||||||
enumdupmsg : boolean;
|
enumdupmsg, first : boolean;
|
||||||
newtype : ttypesym;
|
newtype : ttypesym;
|
||||||
oldlocalswitches : tlocalswitches;
|
oldlocalswitches : tlocalswitches;
|
||||||
begin
|
begin
|
||||||
@ -603,6 +603,7 @@ implementation
|
|||||||
_LKLAMMER:
|
_LKLAMMER:
|
||||||
begin
|
begin
|
||||||
consume(_LKLAMMER);
|
consume(_LKLAMMER);
|
||||||
|
first := true;
|
||||||
{ allow negativ value_str }
|
{ allow negativ value_str }
|
||||||
l:=-1;
|
l:=-1;
|
||||||
enumdupmsg:=false;
|
enumdupmsg:=false;
|
||||||
@ -641,7 +642,7 @@ implementation
|
|||||||
p.free;
|
p.free;
|
||||||
{ please leave that a note, allows type save }
|
{ please leave that a note, allows type save }
|
||||||
{ declarations in the win32 units ! }
|
{ declarations in the win32 units ! }
|
||||||
if (v<=l) and (not enumdupmsg) then
|
if (not first) and (v<=l) and (not enumdupmsg) then
|
||||||
begin
|
begin
|
||||||
Message(parser_n_duplicate_enum);
|
Message(parser_n_duplicate_enum);
|
||||||
enumdupmsg:=true;
|
enumdupmsg:=true;
|
||||||
@ -650,6 +651,7 @@ implementation
|
|||||||
end
|
end
|
||||||
else
|
else
|
||||||
inc(l);
|
inc(l);
|
||||||
|
first := false;
|
||||||
storepos:=akttokenpos;
|
storepos:=akttokenpos;
|
||||||
akttokenpos:=defpos;
|
akttokenpos:=defpos;
|
||||||
tstoredsymtable(aktenumdef.owner).insert(tenumsym.create(s,aktenumdef,l));
|
tstoredsymtable(aktenumdef.owner).insert(tenumsym.create(s,aktenumdef,l));
|
||||||
|
10
tests/tbs/tb0502.pp
Normal file
10
tests/tbs/tb0502.pp
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
{ %norun }
|
||||||
|
{ %opt=-Sen }
|
||||||
|
type
|
||||||
|
TRegister = (
|
||||||
|
TRegisterLowEnum := Low(longint),
|
||||||
|
TRegisterHighEnum := High(longint)
|
||||||
|
);
|
||||||
|
|
||||||
|
begin
|
||||||
|
end.
|
Loading…
Reference in New Issue
Block a user