unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Ken Raeburn <raeburn@raeburn.org>
To: linasvepstas@gmail.com
Cc: "Ludovic Courtès" <ludo@gnu.org>,
	"Guile Development" <guile-devel@gnu.org>
Subject: Re: GNU Guile 1.9.5 released (alpha)
Date: Sat, 28 Nov 2009 22:44:55 -0500	[thread overview]
Message-ID: <D16CC92D-74F6-4917-BEA8-6E2C8948B25D@raeburn.org> (raw)
In-Reply-To: <3ae3aa420911281724t32167ed8ofd4bdefa05531819@mail.gmail.com>

On Nov 28, 2009, at 20:24, Linas Vepstas wrote:
> googleing the error messages indicates that anonymous structs
> are OK in C, but are somehow bad form in C++, thus gcc
> generates this error. I don't understand why this would matter.

The error message you quoted refers specifically to a function taking  
a SCM argument.  When a C++ function not declared 'extern "C"' takes  
an object or pointer using a struct/class type, the name of the type  
is used in the "name mangling" that encodes the function signature in  
the object-code name for the function; for example, "foo(int)" may  
become "_Z3fooi" (something like: _Z = function encoding prefix, 3 =  
length of function name, i = int), and "foo(struct x)" may become  
"_Z3foo1x" (1 = length of name of user-defined type), but for an  
anonymous type, you can't encode it.

I'm not sure of the rules for anonymous classes in C++; searching the  
1998 standard I see only references to anonymous unions.  My best  
guess is that you're just not allowed to use them for declaring  
objects with linkage, but I can't (so far) quote you chapter and verse  
to support that.

Ken




  reply	other threads:[~2009-11-29  3:44 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-17 23:21 GNU Guile 1.9.5 released (alpha) Ludovic Courtès
2009-11-18 11:23 ` Ludovic Courtès
2009-11-28 22:55 ` Linas Vepstas
2009-11-28 23:21   ` Ludovic Courtès
2009-11-29  1:24     ` Linas Vepstas
2009-11-29  3:44       ` Ken Raeburn [this message]
2009-11-29 12:34       ` Ludovic Courtès
2009-11-29 16:13         ` Linas Vepstas
2009-11-29 15:47       ` Ludovic Courtès
2009-11-29  2:27 ` Linas Vepstas
2009-11-29 12:22   ` Ludovic Courtès
2009-11-29  2:45 ` Linas Vepstas
2009-11-29  6:07   ` Linas Vepstas
2009-11-29 12:33   ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=D16CC92D-74F6-4917-BEA8-6E2C8948B25D@raeburn.org \
    --to=raeburn@raeburn.org \
    --cc=guile-devel@gnu.org \
    --cc=linasvepstas@gmail.com \
    --cc=ludo@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).