From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,fb8bad9f41ba1413 X-Google-Attributes: gid103376,public From: stt@houdini.camb.inmet.com (Tucker Taft) Subject: Re: Pragma inline results in duplicate strings? Date: 1997/06/09 Message-ID: #1/1 X-Deja-AN: 247276341 Sender: news@inmet.camb.inmet.com (USENET news) X-Nntp-Posting-Host: houdini.camb.inmet.com References: <5n2ohf$htn$1@goanna.cs.rmit.edu.au> Organization: Intermetrics, Inc. Newsgroups: comp.lang.ada Date: 1997-06-09T00:00:00+00:00 List-Id: 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 ("
"); : 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