* Generics and null procedures
@ 2003-04-13 18:40 kat-Zygfryd
2003-04-13 19:56 ` Larry Kilgallen
0 siblings, 1 reply; 4+ messages in thread
From: kat-Zygfryd @ 2003-04-13 18:40 UTC (permalink / raw)
generic
(...)
with procedure Proc;
package Pack is....
---
procedure NullProc is
begin null; end NullProc;
---
package NewPack is new Pack(NullProc);
---
My question is: is the compiler smart enough
to ignore all calls to NullProc in Pack, or is
it going to call this obsolete procedure?
Zygfryd
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Generics and null procedures
2003-04-13 18:40 Generics and null procedures kat-Zygfryd
@ 2003-04-13 19:56 ` Larry Kilgallen
2003-04-13 21:06 ` kat-Zygfryd
0 siblings, 1 reply; 4+ messages in thread
From: Larry Kilgallen @ 2003-04-13 19:56 UTC (permalink / raw)
In article <b7cb0a$8hd$1@news.onet.pl>, "kat-Zygfryd" <6667@wp.pl> writes:
> generic
> (...)
> with procedure Proc;
> package Pack is....
> ---
> procedure NullProc is
> begin null; end NullProc;
> ---
> package NewPack is new Pack(NullProc);
> ---
>
> My question is: is the compiler smart enough
> to ignore all calls to NullProc in Pack, or is
> it going to call this obsolete procedure?
Certainly that depends on what compiler, which you have not indicated.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Generics and null procedures
2003-04-13 19:56 ` Larry Kilgallen
@ 2003-04-13 21:06 ` kat-Zygfryd
2003-04-14 15:45 ` Stephen Leake
0 siblings, 1 reply; 4+ messages in thread
From: kat-Zygfryd @ 2003-04-13 21:06 UTC (permalink / raw)
"Larry Kilgallen" <Kilgallen@SpamCop.net> wrote in message
news:sfwnjkDEa3Cv@eisner.encompasserve.org...
> Certainly that depends on what compiler, which you have not indicated.
GNAT 3.15p (NT version)
Zygfryd
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Generics and null procedures
2003-04-13 21:06 ` kat-Zygfryd
@ 2003-04-14 15:45 ` Stephen Leake
0 siblings, 0 replies; 4+ messages in thread
From: Stephen Leake @ 2003-04-14 15:45 UTC (permalink / raw)
"kat-Zygfryd" <6667@wp.pl> writes:
> "Larry Kilgallen" <Kilgallen@SpamCop.net> wrote in message
> news:sfwnjkDEa3Cv@eisner.encompasserve.org...
> > Certainly that depends on what compiler, which you have not indicated.
>
> GNAT 3.15p (NT version)
Turn on all optimizations, including global inlining. Then it should
optimize away the call to the null procedure. If it doesn't, submit a
bug report to ACT.
--
-- Stephe
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2003-04-14 15:45 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-04-13 18:40 Generics and null procedures kat-Zygfryd
2003-04-13 19:56 ` Larry Kilgallen
2003-04-13 21:06 ` kat-Zygfryd
2003-04-14 15:45 ` Stephen Leake
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox