This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug ada/67205] violation of No_Implicit_Dynamic_Code restriction not reported
- From: "ebotcazou at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 10 Sep 2015 08:17:54 +0000
- Subject: [Bug ada/67205] violation of No_Implicit_Dynamic_Code restriction not reported
- Auto-submitted: auto-generated
- References: <bug-67205-4 at http dot gcc dot gnu dot org/bugzilla/>
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.