comp.lang.ada
 help / color / mirror / Atom feed
* no code generation for c strings
@ 2016-06-03  8:14 Luke A. Guest
  2016-06-03  8:25 ` Dmitry A. Kazakov
  0 siblings, 1 reply; 13+ messages in thread
From: Luke A. Guest @ 2016-06-03  8:14 UTC (permalink / raw)




Hi,

In my current binding efforts I'm having to have a bunch of c strings which
denote the function name that needs to be requested from the API. If I
create an Ada string and convert it to c then whole application gets two
copies of each string which is overkill.

What I would like to have is have the compiler recognise that I've declared
a static char_array and just not generate a call to the secondary stack to
allocate a new string. Is this actually possible? -O2/3 still generate the
call.

S : constant char_array := to_c ("hello" & nul);


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2016-06-04  6:31 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2016-06-03 21:25           ` Simon Wright
2016-06-03 21:33             ` Luke A. Guest

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox