unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* Now that SCM type is a union...
@ 2011-08-12 12:44 rixed
  2011-08-13  5:26 ` Ken Raeburn
  2011-09-15 19:54 ` Andy Wingo
  0 siblings, 2 replies; 9+ messages in thread
From: rixed @ 2011-08-12 12:44 UTC (permalink / raw)
  To: guile-user

Between stable-2.0 and master a patch changed the C representation
of the SCM type so that it is now a union.

This code :

static SCM foo = SCM_UNSPECIFIED;

now expands to something similar to :

static SCM foo = (SCM) { ... };

This form (casting a struct or union initializer while initializing a
global identifier) is for some reason invalid when gcc is called with
"-std=c99" (I was about to say : "was invalid in c99", but who really
knowns?) nor "-std=gnu99" (although it works when std is set to c89 or
gnu89).

I tried to get rid of the cast to (SCM) in tags.h but the compilation
then fails since some code relies on the cast to SCM.

So, lets suppose I have an app written in c99 that I want to extend with
guile, how could I compile it ?




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

end of thread, other threads:[~2011-09-15 19:54 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-12 12:44 Now that SCM type is a union rixed
2011-08-13  5:26 ` Ken Raeburn
2011-08-13 10:40   ` rixed
2011-08-13 12:23   ` Andy Wingo
2011-08-13 22:00     ` Ken Raeburn
2011-08-14 20:10       ` Andy Wingo
2011-08-15  2:04         ` Ken Raeburn
2011-08-15  2:21           ` Ken Raeburn
2011-09-15 19:54 ` Andy Wingo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).