From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Kevin Brott" Newsgroups: gmane.lisp.guile.user Subject: Re: Guile 1.8.2 Compile Error Date: Mon, 12 Nov 2007 15:30:03 -0800 Organization: Providence Health and Services Message-ID: <1194910203.8243.6.camel@vanguard.or.providence.org> References: <1194888764.4167.13.camel@vanguard.or.providence.org> <87fxzbql1e.fsf@chbouib.org> <1194903472.7717.23.camel@vanguard.or.providence.org> <87hcjrgiov.fsf@chbouib.org> Reply-To: kevin.brott@providence.org NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1194910272 23166 80.91.229.12 (12 Nov 2007 23:31:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 12 Nov 2007 23:31:12 +0000 (UTC) Cc: Guile-User To: =?iso-8859-1?Q?Ludovic_Court=E8s?= Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Tue Nov 13 00:31:14 2007 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Irik9-0003hq-TC for guile-user@m.gmane.org; Tue, 13 Nov 2007 00:31:02 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Irijx-00044W-0v for guile-user@m.gmane.org; Mon, 12 Nov 2007 18:30:49 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IrijO-0003tM-4M for guile-user@gnu.org; Mon, 12 Nov 2007 18:30:14 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IrijM-0003sV-2U for guile-user@gnu.org; Mon, 12 Nov 2007 18:30:13 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IrijL-0003sD-RK for guile-user@gnu.org; Mon, 12 Nov 2007 18:30:11 -0500 Original-Received: from phsor-nat2.providence.org ([170.220.2.14]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IrijF-0008Uv-NM; Mon, 12 Nov 2007 18:30:07 -0500 Original-Received: from mail pickup service by phsor-nat2.providence.org with Microsoft SMTPSVC; Mon, 12 Nov 2007 15:30:04 -0800 X-KryptiqSpooler: Handled Original-Received: from WNP0620K.or.providence.org ([170.220.65.132]) by phsor-nat2.providence.org with Microsoft SMTPSVC(6.0.3790.1830); Mon, 12 Nov 2007 15:30:03 -0800 thread-index: Acglg/Oz45pcQiDOTlOIYY5LQ8Iw/w== Original-Received: from wn1218.or.providence.org ([170.220.66.246]) by WNP0620K.or.providence.org with Microsoft SMTPSVC(6.0.3790.1830); Mon, 12 Nov 2007 15:30:03 -0800 Original-Received: from 170.220.75.108 ([170.220.75.108]) by wn1218.or.providence.org ([170.220.66.246]) via Exchange Front-End Server email.providence.org ([170.220.65.142]) with Microsoft Exchange Server HTTP-DAV ; Mon, 12 Nov 2007 23:30:03 +0000 Original-Received: from vanguard by email.providence.org; 12 Nov 2007 15:30:03 -0800 In-Reply-To: <87hcjrgiov.fsf@chbouib.org> Content-Class: urn:content-classes:message Importance: normal Priority: normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.2992 X-Mailer: Evolution 2.12.1 X-OriginalArrivalTime: 12 Nov 2007 23:30:03.0932 (UTC) FILETIME=[F3AEC5C0:01C82583] X-detected-kernel: by monty-python.gnu.org: Windows XP SP1+, 2000 SP3 X-Greylist: delayed 21436 seconds by postgrey-1.27 at monty-python; Mon, 12 Nov 2007 18:30:05 EST X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:6268 Archived-At: On Tue, 2007-11-13 at 00:14 +0100, Ludovic Court=C3=A8s wrote: .. > > In file included from ../libguile/gc.h:27, > > from ../libguile.h:73, > > from discouraged.c:22: > > ./libguile/hooks.h:43: error: expected ';', ',' or ')' before '.' = token >=20 > This is the second line of the typedef for `scm_t_c_hook_function'. = Can > you try compiling *only* that typedef? And then this: >=20 > typedef void * (* foo_t) (void *, void *); >=20 > Then: >=20 > typedef void (* foo_t) (void *, void *); >=20 >=20 >=20 >=20 >=20 >=20 > The `scm_t_c_hook_function' seems perfectly valid to me so if the > compiler chokes, then I'm afraid it's a broken compiler. >=20 > > Were you asking to just put the quoted code lines in a .c file and = see > > what happens when I apply gcc to it, or were you looking for = something > > more specific? >=20 > The former. >=20 > > In the hopes it's something simple -- if test.c is: > > ---cut--- > > > > typedef void *(*scm_t_c_hook_function) (void *hook_data, > > void *func_data, > > void *data); > > > > SCM_API void scm_c_hook_add (scm_t_c_hook *hook, > > scm_t_c_hook_function func, > > void *func_data, > > int appendp); > > > > SCM_API void scm_c_hook_remove (scm_t_c_hook *hook, > > scm_t_c_hook_function func, > > void *func_data); > > > > ---cut--- > > > > and I do gcc -o test test.c ... I get ... > > > > test.c:6: error: expected '=3D', ',', ';', 'asm' or '__attribute__' = before 'void' > > test.c:11: error: expected '=3D', ',', ';', 'asm' or '__attribute__' = before 'void' > > > > Which are the SCM_API declarations. >=20 > So now the typedef itself doesn't yield any error? >=20 > Did you prepend "#define SCM_API extern"? It will fail without this. >=20 > > ---cut--- > > 41: > > 42: typedef void *(*scm_t_c_hook_function) (void *hook_data, > > 43* void *func_data, > > 44: void *data); > > 45: > > 46: typedef struct scm_t_c_hook_entry { > > 47: struct scm_t_c_hook_entry *next; > > 48* scm_t_c_hook_function func; > > 49: void *data; > > 50: } scm_t_c_hook_entry; > > 51...60 > > 61: SCM_API void scm_c_hook_add (scm_t_c_hook *hook, > > 62* scm_t_c_hook_function func, > > 63* void *func_data, > > 64: int appendp); > > 65: SCM_API void scm_c_hook_remove (scm_t_c_hook *hook, > > 66* scm_t_c_hook_function func, > > 67* void *func_data); > > 68: > > ---cut--- > > > > I get ... > > test2.c:12: error: expected '=3D', ',', ';', 'asm' or = '__attribute__' before 'void' > > test2.c:16: error: expected '=3D', ',', ';', 'asm' or = '__attribute__' before 'void' > > > > Which are the SCM_API declarations again. >=20 > Again, no error with the typedef? >=20 > > Suggestions, correction for a more valid / informative test? >=20 > If one of the above `foo_t' typedefs works, then you can try compiling > this: >=20 > extern void make_foo (void *x, foo_t function); >=20 > Then maybe this: >=20 > extern void make_foo (void *x, foo_t *function); >=20 > This is all trial-and-error since I have no idea of what's wrong with > this compiler. >=20 > I quickly browsed the bug database at gcc.gnu.org and failed to find > anything related. You might want to try that too... >=20 > Thanks, > Ludovic. --=20 #include /* Kevin Brott =20 * Unix Systems Engineer - SA Group - Provtech * Providence Health Systems - 503-216-4703 */ DISCLAIMER: This message is intended for the sole use of the addressee, and may = contain information that is privileged, confidential and exempt from = disclosure under applicable law. If you are not the addressee you are = hereby notified that you may not use, copy, disclose, or distribute to = anyone the message or any information contained in the message. If you = have received this message in error, please immediately advise the = sender by reply email and delete this message. _______________________________________________ Guile-user mailing list Guile-user@gnu.org http://lists.gnu.org/mailman/listinfo/guile-user