From: stt@houdini.camb.inmet.com (Tucker Taft)
Subject: Re: Pragma inline results in duplicate strings?
Date: 1997/06/09
Date: 1997-06-09T00:00:00+00:00 [thread overview]
Message-ID: <EBIny1.LG7.0.-s@inmet.camb.inmet.com> (raw)
In-Reply-To: 5n2ohf$htn$1@goanna.cs.rmit.edu.au
Dale Stanbrough (dale@goanna.cs.rmit.edu.au) wrote:
: You'll probably say "implementation dependent", but i am wondering what the
: normal thing for compilers to do is in the following situation.
Implementation dependent ;-). Some compilers "pool" strings, and
others don't. There is no reason *not* to pool strings in Ada,
since they are constants (unlike in C, where a string literal might
be updated through a pointer). It probably makes no difference
whether the string appears in an inline, I suspect. If the
same string is used multiple times in a single source file,
it is straightforward for the compiler to share a single
copy of the string.
: procedure Break is
: begin
: Put ("<br>");
: end;
: pragma Inline (Break);
: Is the string duplicated for each inline call?
: Dale
--
-Tucker Taft stt@inmet.com http://www.inmet.com/~stt/
Intermetrics, Inc. Burlington, MA USA
next prev parent reply other threads:[~1997-06-09 0:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
1997-06-04 0:00 Pragma inline results in duplicate strings? Dale Stanbrough
1997-06-04 0:00 ` Samuel Tardieu
1997-06-07 0:00 ` Robert Dewar
1997-06-09 0:00 ` Tucker Taft [this message]
1997-06-11 0:00 ` Tucker Taft
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox