guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Now that SCM type is a union...


From: rixed
Subject: Now that SCM type is a union...
Date: Fri, 12 Aug 2011 14:44:36 +0200
User-agent: Mutt/1.5.20 (2009-06-14)

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 ?




reply via email to

[Prev in Thread] Current Thread [Next in Thread]