mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-09 02:29:33 +01:00
* fixed string:= which allowed almost any type
This commit is contained in:
parent
797f6c4b35
commit
756165dd30
@ -1826,7 +1826,7 @@ unit pass_1;
|
|||||||
if (p^.left^.resulttype^.deftype=stringdef) and (assigned(p^.right^.resulttype)) then
|
if (p^.left^.resulttype^.deftype=stringdef) and (assigned(p^.right^.resulttype)) then
|
||||||
begin
|
begin
|
||||||
if not ((p^.right^.resulttype^.deftype=stringdef) or
|
if not ((p^.right^.resulttype^.deftype=stringdef) or
|
||||||
((p^.right^.resulttype^.deftype=orddef) {and (porddef(p^.right^.resulttype)^.typ=uchar)})) then
|
((p^.right^.resulttype^.deftype=orddef) and (porddef(p^.right^.resulttype)^.typ=uchar))) then
|
||||||
begin
|
begin
|
||||||
p^.right:=gentypeconvnode(p^.right,p^.left^.resulttype);
|
p^.right:=gentypeconvnode(p^.right,p^.left^.resulttype);
|
||||||
firstpass(p^.right);
|
firstpass(p^.right);
|
||||||
@ -4967,7 +4967,6 @@ unit pass_1;
|
|||||||
var
|
var
|
||||||
oldcodegenerror : boolean;
|
oldcodegenerror : boolean;
|
||||||
oldswitches : Tcswitches;
|
oldswitches : Tcswitches;
|
||||||
{ there some calls of do_firstpass in the parser }
|
|
||||||
oldpos : tfileposinfo;
|
oldpos : tfileposinfo;
|
||||||
{$ifdef extdebug}
|
{$ifdef extdebug}
|
||||||
str1,str2 : string;
|
str1,str2 : string;
|
||||||
@ -5002,7 +5001,6 @@ unit pass_1;
|
|||||||
not_first:=false;
|
not_first:=false;
|
||||||
{$endif extdebug}
|
{$endif extdebug}
|
||||||
|
|
||||||
codegenerror:=false;
|
|
||||||
{$ifdef NEWINPUT}
|
{$ifdef NEWINPUT}
|
||||||
aktfilepos:=p^.fileinfo;
|
aktfilepos:=p^.fileinfo;
|
||||||
{$else}
|
{$else}
|
||||||
@ -5010,13 +5008,15 @@ unit pass_1;
|
|||||||
{$endif NEWINPUT}
|
{$endif NEWINPUT}
|
||||||
aktswitches:=p^.pragmas;
|
aktswitches:=p^.pragmas;
|
||||||
|
|
||||||
if not(p^.error) then
|
if not p^.error then
|
||||||
begin
|
begin
|
||||||
|
codegenerror:=false;
|
||||||
procedures[p^.treetype](p);
|
procedures[p^.treetype](p);
|
||||||
p^.error:=codegenerror;
|
p^.error:=codegenerror;
|
||||||
codegenerror:=codegenerror or oldcodegenerror;
|
codegenerror:=codegenerror or oldcodegenerror;
|
||||||
end
|
end
|
||||||
else codegenerror:=true;
|
else
|
||||||
|
codegenerror:=true;
|
||||||
{$ifdef extdebug}
|
{$ifdef extdebug}
|
||||||
if not_first then
|
if not_first then
|
||||||
begin
|
begin
|
||||||
@ -5064,7 +5064,10 @@ unit pass_1;
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.36 1998-07-07 11:20:00 peter
|
Revision 1.37 1998-07-07 12:31:44 peter
|
||||||
|
* fixed string:= which allowed almost any type
|
||||||
|
|
||||||
|
Revision 1.36 1998/07/07 11:20:00 peter
|
||||||
+ NEWINPUT for a better inputfile and scanner object
|
+ NEWINPUT for a better inputfile and scanner object
|
||||||
|
|
||||||
Revision 1.35 1998/06/25 14:04:19 peter
|
Revision 1.35 1998/06/25 14:04:19 peter
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user