Re: Now that SCM type is a union...

2011-09-15 Thread Andy Wingo
On Fri 12 Aug 2011 05:44, ri...@happyleptic.org writes: > Between stable-2.0 and master a patch changed the C representation > of the SCM type so that it is now a union. As a result of this constant-expression issue, I have reverted those patches. Now `master' uses the same SCM representation as

Re: Now that SCM type is a union...

2011-08-14 Thread Ken Raeburn
On Aug 14, 2011, at 22:04, Ken Raeburn wrote: >>> * Shouldn't there be testing to catch this? (C89 mode, C99 mode, >>> different C++ specs, enabling various compiler warnings -- for >>> whatever compiler is in use -- and make them fatal, any interesting >>> ways one might want to use libguile in a

Re: Now that SCM type is a union...

2011-08-14 Thread Ken Raeburn
On Aug 14, 2011, at 16:10, Andy Wingo wrote: >> * We should expect some Guile applications to be in C++. What >> versions of the C++ spec should Guile support? > > Dunno. What do other languages have to do with Guile's C interface? > Specifically what does C++ have to do with this? (Serious que

Re: Now that SCM type is a union...

2011-08-14 Thread Andy Wingo
Hi Ken, On Sun 14 Aug 2011 00:00, Ken Raeburn writes: > * We should expect some Guile applications to be in C++. What > versions of the C++ spec should Guile support? Dunno. What do other languages have to do with Guile's C interface? Specifically what does C++ have to do with this? (Serio

Re: Now that SCM type is a union...

2011-08-13 Thread Ken Raeburn
On Aug 13, 2011, at 08:23, Andy Wingo wrote: > I only have a draft copy of C99, from 7 September 2007, but it does > permit constant expressions to appear outside function bodies. How > could that happen except for in initializers? I do see the language in > the GCC docs though; it's confusing.

Re: Now that SCM type is a union...

2011-08-13 Thread Andy Wingo
On Sat 13 Aug 2011 07:26, Ken Raeburn writes: > That syntax -- the parenthesized type followed by a list of initializers > in braces -- is called a "compound literal" (technically not a cast > expression) and was added in C99. The value of a compound literal is an > anonymous object with a value

Re: Now that SCM type is a union...

2011-08-13 Thread rixed
-[ Sat, Aug 13, 2011 at 01:26:03AM -0400, Ken Raeburn ] > ("Is for some reason invalid" is not very descriptive; please include > specific compiler messages.) Sorry ; the specific error message was, you guesssed it right: "initializer element is not constant". > That syntax -- the parenthesi

Re: Now that SCM type is a union...

2011-08-12 Thread Ken Raeburn
On Aug 12, 2011, at 08:44, ri...@happyleptic.org wrote: > 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) {

Now that SCM type is a union...

2011-08-12 Thread rixed
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