Skip to content

Commit

Permalink
Merge branch 'mr/jicquel/github#88-workaround-gnat-12' into 'master'
Browse files Browse the repository at this point in the history
Rephrase a record's return to avoid a bug in GNAT 12

See merge request eng/toolchain/gnatcoll-core!159
  • Loading branch information
Jicquel committed Nov 28, 2024
2 parents 57fda8e + 515db1c commit 02d2a57
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion core/src/gnatcoll-json.adb
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,13 @@ package body GNATCOLL.JSON is

Deallocate (Current_Key);
Free (Read_States);
return (Success => True, Value => Result);

declare
R_Result : constant Read_Result := (Success => True, Value => Result);
begin
return R_Result;
end;

exception
when E : Invalid_JSON_Stream =>
Free (Read_States);
Expand Down

0 comments on commit 02d2a57

Please sign in to comment.