From: Luke A. Guest <laguest@archeia.com>
Subject: Re: no code generation for c strings
Date: Fri, 3 Jun 2016 21:30:49 +0100
Date: 2016-06-03T21:30:49+01:00 [thread overview]
Message-ID: <814658902.486678528.509196.laguest-archeia.com@nntp.aioe.org> (raw)
In-Reply-To: ly60tqqffo.fsf@pushface.org
Simon Wright <simon@pushface.org> wrote:
> Lucretia <laguest9000@googlemail.com> writes:
>
>> Interesting, I tried this and dumped the asm, similar there, but as
>> soon as you add more code, it just gets confusing, because it never
>> references the actual label for the string anywhere.
> [...]
>> S3 : constant C.char_array := "hello" & C.char'Val (0);
>> begin
>> -- Put_Line (C.To_Ada (S3));
>
> You've commented out the only place where the variable is referenced --
> here, it made up a label (LC1) and referenced that.
>
Yeah that was on purpose as it produced a lot of stuff that complicated
looking at it, in hindsight I probably should've just done an assignment,
might've produced less.
I'm still not sure why your way of doing this produced the desired effect
though.
next prev parent reply other threads:[~2016-06-03 20:30 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-03 8:14 no code generation for c strings Luke A. Guest
2016-06-03 8:25 ` Dmitry A. Kazakov
2016-06-03 9:23 ` Luke A. Guest
2016-06-03 9:37 ` Dmitry A. Kazakov
2016-06-03 14:27 ` G.B.
2016-06-03 17:00 ` Lucretia
2016-06-04 6:31 ` Georg Bauhaus
2016-06-03 16:30 ` Simon Wright
2016-06-03 17:04 ` Lucretia
2016-06-03 18:45 ` Simon Wright
2016-06-03 20:30 ` Luke A. Guest [this message]
2016-06-03 21:25 ` Simon Wright
2016-06-03 21:33 ` Luke A. Guest
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox