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 [GAH] Date: Mon, 12 Nov 2007 15:39:14 -0800 Organization: Providence Health and Services Message-ID: <1194910754.8243.17.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 1194910799 24635 80.91.229.12 (12 Nov 2007 23:39:59 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 12 Nov 2007 23:39:59 +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:40:02 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 1Irism-0006BW-4Q for guile-user@m.gmane.org; Tue, 13 Nov 2007 00:39:56 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IrisZ-0005wD-Rn for guile-user@m.gmane.org; Mon, 12 Nov 2007 18:39:43 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IrisF-0005Z0-EX for guile-user@gnu.org; Mon, 12 Nov 2007 18:39:23 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IrisD-0005XS-Vy for guile-user@gnu.org; Mon, 12 Nov 2007 18:39:22 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IrisD-0005XD-Ph for guile-user@gnu.org; Mon, 12 Nov 2007 18:39:21 -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 1Iris9-00026v-6t; Mon, 12 Nov 2007 18:39:17 -0500 Original-Received: from mail pickup service by phsor-nat2.providence.org with Microsoft SMTPSVC; Mon, 12 Nov 2007 15:39:15 -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:39:14 -0800 thread-index: AcglhTvnV36CK4jsTb2spm5+u6QQww== 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:39:14 -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:39:14 +0000 Original-Received: from vanguard by email.providence.org; 12 Nov 2007 15:39:14 -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:39:14.0550 (UTC) FILETIME=[3BE06960:01C82585] X-detected-kernel: by monty-python.gnu.org: Windows XP SP1+, 2000 SP3 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:6269 Archived-At: Bollux, let's try that again... On Tue, 2007-11-13 at 00:14 +0100, Ludovic Court=C3=A8s wrote: .. > 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 All three compile without error if I wrap them in the usual main() {...} > 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. I'd agree - except this is the only code it's broken on, and I went through freshly compiled versions of gcc 3.3.6, 3.4.6, 4.0.4, 4.1.2, and 4.2.2 - and all of them have the same basic problem. FWIW - I couldn't get 1.6.8 to compile until I had a working gcc 4.0.4, and was using 1.4.1 - which has always compiled/worked fine. > So now the typedef itself doesn't yield any error? not on it's own, no. >=20 > Did you prepend "#define SCM_API extern"? It will fail without this. >=20 Nope - you got the code snippets I used. > > ---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? nope. >=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 ---cut--- main() { extern void make_foo (void *x, foo_t function); } ---cut--- # gcc -o evt evt.c=20 evt.c: In function 'main': evt.c:3: error: expected declaration specifiers or '...' before 'foo_t' > Then maybe this: >=20 > extern void make_foo (void *x, foo_t *function); >=20 Same error. > 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... Doing that - not having a lot of luck so far ... Was wondering if it's a bad/missing fixincludes action in gcc ... but if that were the case then I'd think a lot more stuff wouldn't compile besides just guile 1.8. --=20 #include /* Kevin Brott =20 * Unix Systems Engineer - SA Group - Provtech * Providence Health Systems, Tigard, OR */ 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