[Bug ada/67205] violation of No_Implicit_Dynamic_Code restriction not reported
ebotcazou at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Sep 10 08:18:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67205
Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|Unnecessary trampolines for |violation of
|nested packages |No_Implicit_Dynamic_Code
| |restriction not reported
--- Comment #2 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
> The attached example requires generation of trampolines. This may be due to
> bug 57999, but I think a front-end fix would be more reliable.
Please clarify "front-end fix". The language requires pointers to nested
functions in this case and you cannot reasonably change that, nested functions
being first-class citizens in Ada.
More generally, trampolines can indeed be eliminated, but you need changes in
the entire compiler to do it.
> As an additional surprise, pragma Restrictions (No_Implicit_Dynamic_Code)
> does not cause compilation to fail. The error is only detected at binding
> time, and -Wtrampolines is needed to find the culprit.
Yes, the violation is detected but the error is not issued, probably because
it's the instantiation of a run-time unit.
More information about the Gcc-bugs
mailing list