mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-20 11:49:25 +02:00
- removed extraneous maybe_begin_aggregate() when a procvar is initialised
with a pointerconstn, and moved the maybe_end_aggregate() for all procvar initialisation cases to a common location git-svn-id: trunk@30849 -
This commit is contained in:
parent
1e7fcec236
commit
d71f6e9840
@ -1386,17 +1386,16 @@ function get_next_varsym(def: tabstractrecorddef; const SymList:TFPHashObjectLis
|
|||||||
Message(parser_e_no_procvarnested_const);
|
Message(parser_e_no_procvarnested_const);
|
||||||
ftcb.emit_tai(Tai_const.Create_sym(nil),voidpointertype);
|
ftcb.emit_tai(Tai_const.Create_sym(nil),voidpointertype);
|
||||||
end;
|
end;
|
||||||
ftcb.maybe_end_aggregate(def);
|
|
||||||
end
|
end
|
||||||
else if n.nodetype=pointerconstn then
|
else if n.nodetype=pointerconstn then
|
||||||
begin
|
begin
|
||||||
ftcb.maybe_begin_aggregate(def);
|
|
||||||
ftcb.emit_tai_procvar2procdef(Tai_const.Create_pint(tpointerconstnode(n).value),def);
|
ftcb.emit_tai_procvar2procdef(Tai_const.Create_pint(tpointerconstnode(n).value),def);
|
||||||
if not def.is_addressonly then
|
if not def.is_addressonly then
|
||||||
ftcb.emit_tai(Tai_const.Create_sym(nil),voidpointertype);
|
ftcb.emit_tai(Tai_const.Create_sym(nil),voidpointertype);
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
Message(parser_e_illegal_expression);
|
Message(parser_e_illegal_expression);
|
||||||
|
ftcb.maybe_end_aggregate(def);
|
||||||
n.free;
|
n.free;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user