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.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!aioe.org!.POSTED!not-for-mail From: Luke A. Guest Newsgroups: comp.lang.ada Subject: Re: no code generation for c strings Date: Fri, 3 Jun 2016 22:33:11 +0100 Organization: Aioe.org NNTP Server Message-ID: <1763916289.486682087.099848.laguest-archeia.com@nntp.aioe.org> References: <369391051.486634184.002061.laguest-archeia.com@nntp.aioe.org> <718de74d-ab15-4eee-983f-b78d8f8070f1@googlegroups.com> <814658902.486678528.509196.laguest-archeia.com@nntp.aioe.org> NNTP-Posting-Host: L/3Ua2dM6oCRC/18+A91Dg.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Complaints-To: abuse@aioe.org User-Agent: NewsTap/5.1.8 (iPhone/iPod Touch) Cancel-Lock: sha1:r/ZbTK598HyTs6y6hn99qUmtqnA= X-Notice: Filtered by postfilter v. 0.8.2 Xref: news.eternal-september.org comp.lang.ada:30595 Date: 2016-06-03T22:33:11+01:00 List-Id: Simon Wright wrote: > Luke A. Guest writes: >> I'm still not sure why your way of doing this produced the desired effect >> though. > > Possibly because it was in a spec? Yours was in a library-level > subprogram, so there would have been no need for a related symbol? > No, I mean I don't understand why this: S : constant char_array := "hello" & char'val(0); Produces the statically allocated string without using the secondary stack. I know that using to_c will utilise it. Unsurprised the compiler doesn't think that string is of type string. I tried something similar without the end from the ampersand onwards and it complained of different types.