mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-16 23:01:55 +02:00
* finally fixed int->bool conversion properly
This commit is contained in:
parent
2aba43c797
commit
5f2356f45d
@ -52,7 +52,6 @@ interface
|
|||||||
{ procedure second_pchar_to_string;override; }
|
{ procedure second_pchar_to_string;override; }
|
||||||
{ procedure second_class_to_intf;override; }
|
{ procedure second_class_to_intf;override; }
|
||||||
{ procedure second_char_to_char;override; }
|
{ procedure second_char_to_char;override; }
|
||||||
procedure pass_2;override;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
@ -291,8 +290,6 @@ implementation
|
|||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
if codegenerror then
|
|
||||||
exit;
|
|
||||||
location_reset(location,LOC_REGISTER,def_cgsize(resulttype.def));
|
location_reset(location,LOC_REGISTER,def_cgsize(resulttype.def));
|
||||||
opsize := def_cgsize(left.resulttype.def);
|
opsize := def_cgsize(left.resulttype.def);
|
||||||
case left.location.loc of
|
case left.location.loc of
|
||||||
@ -363,33 +360,15 @@ implementation
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure tppctypeconvnode.pass_2;
|
|
||||||
{$ifdef TESTOBJEXT2}
|
|
||||||
var
|
|
||||||
r : preference;
|
|
||||||
nillabel : plabel;
|
|
||||||
{$endif TESTOBJEXT2}
|
|
||||||
begin
|
|
||||||
{ this isn't good coding, I think tc_bool_2_int, shouldn't be }
|
|
||||||
{ type conversion (FK) }
|
|
||||||
|
|
||||||
if not(convtype in [tc_bool_2_int,tc_bool_2_bool]) then
|
|
||||||
begin
|
|
||||||
secondpass(left);
|
|
||||||
location_copy(location,left.location);
|
|
||||||
if codegenerror then
|
|
||||||
exit;
|
|
||||||
end;
|
|
||||||
second_call_helper(convtype);
|
|
||||||
end;
|
|
||||||
|
|
||||||
|
|
||||||
begin
|
begin
|
||||||
ctypeconvnode:=tppctypeconvnode;
|
ctypeconvnode:=tppctypeconvnode;
|
||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.47 2003-12-04 20:37:02 jonas
|
Revision 1.48 2003-12-07 11:21:05 jonas
|
||||||
|
* finally fixed int->bool conversion properly
|
||||||
|
|
||||||
|
Revision 1.47 2003/12/04 20:37:02 jonas
|
||||||
* fixed some int<->boolean type conversion issues
|
* fixed some int<->boolean type conversion issues
|
||||||
|
|
||||||
Revision 1.46 2003/11/29 16:27:19 jonas
|
Revision 1.46 2003/11/29 16:27:19 jonas
|
||||||
|
Loading…
Reference in New Issue
Block a user