mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-14 00:19:25 +02:00
* fixed wrong typecasts
This commit is contained in:
parent
5534e9ccae
commit
7c0b6e129e
@ -2161,12 +2161,14 @@ type
|
|||||||
else
|
else
|
||||||
{ not a procedure variable }
|
{ not a procedure variable }
|
||||||
begin
|
begin
|
||||||
|
if procdefinition.deftype<>procdef then
|
||||||
|
internalerror(200411071);
|
||||||
{ calc the correture value for the register }
|
{ calc the correture value for the register }
|
||||||
{ handle predefined procedures }
|
{ handle predefined procedures }
|
||||||
if (procdefinition.proccalloption=pocall_inline) then
|
if (procdefinition.proccalloption=pocall_inline) then
|
||||||
begin
|
begin
|
||||||
{ inherit flags }
|
{ inherit flags }
|
||||||
current_procinfo.flags := current_procinfo.flags + ((procdefinition as tprocdef).inlininginfo^.flags*inherited_inlining_flags);
|
current_procinfo.flags := current_procinfo.flags + (tprocdef(procdefinition).inlininginfo^.flags*inherited_inlining_flags);
|
||||||
|
|
||||||
if assigned(methodpointer) then
|
if assigned(methodpointer) then
|
||||||
CGMessage(cg_e_unable_inline_object_methods);
|
CGMessage(cg_e_unable_inline_object_methods);
|
||||||
@ -2413,7 +2415,10 @@ begin
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.258 2004-11-08 22:09:58 peter
|
Revision 1.259 2004-11-09 17:26:47 peter
|
||||||
|
* fixed wrong typecasts
|
||||||
|
|
||||||
|
Revision 1.258 2004/11/08 22:09:58 peter
|
||||||
* tvarsym splitted
|
* tvarsym splitted
|
||||||
|
|
||||||
Revision 1.257 2004/11/02 12:55:16 peter
|
Revision 1.257 2004/11/02 12:55:16 peter
|
||||||
|
@ -364,7 +364,7 @@ implementation
|
|||||||
end;
|
end;
|
||||||
labelsym :
|
labelsym :
|
||||||
begin
|
begin
|
||||||
location.reference.symbol:=objectlibrary.newasmsymbol(ttypedconstsym(symtableentry).mangledname,AB_EXTERNAL,AT_FUNCTION);
|
location.reference.symbol:=objectlibrary.newasmsymbol(tlabelsym(symtableentry).mangledname,AB_EXTERNAL,AT_FUNCTION);
|
||||||
end;
|
end;
|
||||||
else internalerror(4);
|
else internalerror(4);
|
||||||
end;
|
end;
|
||||||
@ -957,7 +957,10 @@ begin
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.131 2004-11-08 22:09:59 peter
|
Revision 1.132 2004-11-09 17:26:47 peter
|
||||||
|
* fixed wrong typecasts
|
||||||
|
|
||||||
|
Revision 1.131 2004/11/08 22:09:59 peter
|
||||||
* tvarsym splitted
|
* tvarsym splitted
|
||||||
|
|
||||||
Revision 1.130 2004/11/01 15:32:12 peter
|
Revision 1.130 2004/11/01 15:32:12 peter
|
||||||
|
@ -2084,7 +2084,7 @@ implementation
|
|||||||
(po_assembler in pd.procoptions) then
|
(po_assembler in pd.procoptions) then
|
||||||
exit;
|
exit;
|
||||||
{ for localloc <> LOC_REFERENCE, we need regvar support inside inlined procedures }
|
{ for localloc <> LOC_REFERENCE, we need regvar support inside inlined procedures }
|
||||||
with tlocalvarsym(pd.funcretsym) do
|
with tabstractnormalvarsym(pd.funcretsym) do
|
||||||
begin
|
begin
|
||||||
localloc.loc:=LOC_REFERENCE;
|
localloc.loc:=LOC_REFERENCE;
|
||||||
localloc.size:=int_cgsize(paramanager.push_size(varspez,vartype.def,pocall_inline));
|
localloc.size:=int_cgsize(paramanager.push_size(varspez,vartype.def,pocall_inline));
|
||||||
@ -2212,7 +2212,10 @@ implementation
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.238 2004-11-08 22:09:59 peter
|
Revision 1.239 2004-11-09 17:26:47 peter
|
||||||
|
* fixed wrong typecasts
|
||||||
|
|
||||||
|
Revision 1.238 2004/11/08 22:09:59 peter
|
||||||
* tvarsym splitted
|
* tvarsym splitted
|
||||||
|
|
||||||
Revision 1.237 2004/11/08 20:23:29 florian
|
Revision 1.237 2004/11/08 20:23:29 florian
|
||||||
|
@ -502,7 +502,7 @@ implementation
|
|||||||
if assigned(defaultvalue) then
|
if assigned(defaultvalue) then
|
||||||
begin
|
begin
|
||||||
include(defaultvalue.symoptions,sp_internal);
|
include(defaultvalue.symoptions,sp_internal);
|
||||||
tprocdef(pd).parast.insert(defaultvalue);
|
pd.parast.insert(defaultvalue);
|
||||||
end;
|
end;
|
||||||
defaultrequired:=true;
|
defaultrequired:=true;
|
||||||
end
|
end
|
||||||
@ -574,6 +574,7 @@ implementation
|
|||||||
var
|
var
|
||||||
orgsp,sp : stringid;
|
orgsp,sp : stringid;
|
||||||
sym : tsym;
|
sym : tsym;
|
||||||
|
srsym : tsym;
|
||||||
srsymtable : tsymtable;
|
srsymtable : tsymtable;
|
||||||
storepos,
|
storepos,
|
||||||
procstartfilepos : tfileposinfo;
|
procstartfilepos : tfileposinfo;
|
||||||
@ -697,10 +698,10 @@ implementation
|
|||||||
repeat
|
repeat
|
||||||
searchagain:=false;
|
searchagain:=false;
|
||||||
akttokenpos:=procstartfilepos;
|
akttokenpos:=procstartfilepos;
|
||||||
aprocsym:=tprocsym(symtablestack.search(sp));
|
srsym:=tsym(symtablestack.search(sp));
|
||||||
|
|
||||||
if not(parse_only) and
|
if not(parse_only) and
|
||||||
not assigned(aprocsym) and
|
not assigned(srsym) and
|
||||||
(symtablestack.symtabletype=staticsymtable) and
|
(symtablestack.symtabletype=staticsymtable) and
|
||||||
assigned(symtablestack.next) and
|
assigned(symtablestack.next) and
|
||||||
(symtablestack.next.unitid=0) then
|
(symtablestack.next.unitid=0) then
|
||||||
@ -712,33 +713,35 @@ implementation
|
|||||||
|
|
||||||
We need to find out if the procedure is global. If it is
|
We need to find out if the procedure is global. If it is
|
||||||
global, it is in the global symtable.}
|
global, it is in the global symtable.}
|
||||||
aprocsym:=tprocsym(symtablestack.next.search(sp));
|
srsym:=tsym(symtablestack.next.search(sp));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ Check if overloaded is a procsym }
|
{ Check if overloaded is a procsym }
|
||||||
if assigned(aprocsym) and
|
if assigned(srsym) then
|
||||||
(aprocsym.typ<>procsym) then
|
begin
|
||||||
begin
|
if srsym.typ=procsym then
|
||||||
{ when the other symbol is a unit symbol then hide the unit
|
aprocsym:=tprocsym(srsym)
|
||||||
symbol }
|
else
|
||||||
if (aprocsym.typ=unitsym) then
|
begin
|
||||||
begin
|
{ when the other symbol is a unit symbol then hide the unit
|
||||||
aprocsym.owner.rename(aprocsym.name,'hidden'+aprocsym.name);
|
symbol }
|
||||||
searchagain:=true;
|
if (srsym.typ=unitsym) then
|
||||||
end
|
begin
|
||||||
else
|
srsym.owner.rename(srsym.name,'hidden'+srsym.name);
|
||||||
begin
|
searchagain:=true;
|
||||||
{ we use a different error message for tp7 so it looks more compatible }
|
end
|
||||||
if (m_fpc in aktmodeswitches) then
|
else
|
||||||
Message1(parser_e_overloaded_no_procedure,aprocsym.realname)
|
begin
|
||||||
else
|
{ we use a different error message for tp7 so it looks more compatible }
|
||||||
tstoredsymtable(symtablestack).DuplicateSym(nil,aprocsym);
|
if (m_fpc in aktmodeswitches) then
|
||||||
{ rename the name to an unique name to avoid an
|
Message1(parser_e_overloaded_no_procedure,srsym.realname)
|
||||||
error when inserting the symbol in the symtable }
|
else
|
||||||
orgsp:=orgsp+'$'+tostr(aktfilepos.line);
|
tstoredsymtable(symtablestack).DuplicateSym(nil,srsym);
|
||||||
{ generate a new aktprocsym }
|
{ rename the name to an unique name to avoid an
|
||||||
aprocsym:=nil;
|
error when inserting the symbol in the symtable }
|
||||||
end;
|
orgsp:=orgsp+'$'+tostr(aktfilepos.line);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
until not searchagain;
|
until not searchagain;
|
||||||
end;
|
end;
|
||||||
@ -2263,7 +2266,10 @@ const
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.200 2004-11-08 22:09:59 peter
|
Revision 1.201 2004-11-09 17:26:47 peter
|
||||||
|
* fixed wrong typecasts
|
||||||
|
|
||||||
|
Revision 1.200 2004/11/08 22:09:59 peter
|
||||||
* tvarsym splitted
|
* tvarsym splitted
|
||||||
|
|
||||||
Revision 1.199 2004/11/05 21:16:55 peter
|
Revision 1.199 2004/11/05 21:16:55 peter
|
||||||
|
@ -427,7 +427,7 @@ implementation
|
|||||||
else
|
else
|
||||||
Message(parser_e_illegal_expression);
|
Message(parser_e_illegal_expression);
|
||||||
end;
|
end;
|
||||||
hp:=tbinarynode(hp).left;
|
hp:=tunarynode(hp).left;
|
||||||
end;
|
end;
|
||||||
srsym:=tloadnode(hp).symtableentry;
|
srsym:=tloadnode(hp).symtableentry;
|
||||||
case srsym.typ of
|
case srsym.typ of
|
||||||
@ -1089,7 +1089,10 @@ implementation
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.95 2004-11-08 22:09:59 peter
|
Revision 1.96 2004-11-09 17:26:47 peter
|
||||||
|
* fixed wrong typecasts
|
||||||
|
|
||||||
|
Revision 1.95 2004/11/08 22:09:59 peter
|
||||||
* tvarsym splitted
|
* tvarsym splitted
|
||||||
|
|
||||||
Revision 1.94 2004/11/01 23:30:11 peter
|
Revision 1.94 2004/11/01 23:30:11 peter
|
||||||
|
Loading…
Reference in New Issue
Block a user