From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ludovic =?UTF-8?B?Q291cnTDqHM=?= Newsgroups: gmane.lisp.guile.bugs Subject: [bug #23681] Function declarators with empty parentheses should not be used Date: Mon, 23 Jun 2008 11:45:46 +0000 Message-ID: <20080623-114546.sv15145.2251@savannah.gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain;charset=UTF-8 X-Trace: ger.gmane.org 1214223532 23455 80.91.229.12 (23 Jun 2008 12:18:52 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 23 Jun 2008 12:18:52 +0000 (UTC) To: Ludovic =?UTF-8?B?Q291cnTDqHM=?= , bug-guile@gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Mon Jun 23 14:19:37 2008 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KAl0x-0001Xw-0y for guile-bugs@m.gmane.org; Mon, 23 Jun 2008 14:19:19 +0200 Original-Received: from localhost ([127.0.0.1]:60917 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KAl07-0001Kl-MY for guile-bugs@m.gmane.org; Mon, 23 Jun 2008 08:18:27 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KAl02-0001J1-K7 for bug-guile@gnu.org; Mon, 23 Jun 2008 08:18:22 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KAl01-0001GO-6Q for bug-guile@gnu.org; Mon, 23 Jun 2008 08:18:21 -0400 Original-Received: from [199.232.76.173] (port=47877 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KAl00-0001Fs-Rc for bug-guile@gnu.org; Mon, 23 Jun 2008 08:18:20 -0400 Original-Received: from savannah.gnu.org ([199.232.41.3]:52352 helo=sv.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KAkUV-0004eY-UX; Mon, 23 Jun 2008 07:45:48 -0400 Original-Received: from [10.0.0.103] (helo=savannah.gnu.org) by sv.gnu.org with esmtp (Exim 4.63) (envelope-from ) id 1KAkUV-00037u-9L; Mon, 23 Jun 2008 11:45:47 +0000 Original-Received: from www-data by savannah.gnu.org with local (Exim 4.63) (envelope-from ) id 1KAkUU-00037q-Vk; Mon, 23 Jun 2008 11:45:47 +0000 X-Savane-Server: savannah.gnu.org:443 [199.232.41.3] X-Savane-Project: guile X-Savane-Tracker: bugs X-Savane-Item-ID: 23681 User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.12) Gecko/20080222 BonEcho/2.0.0.12 X-Apparently-From: 193.50.110.161 (Savane authenticated user civodul) Original-References: In-Reply-To: X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) X-BeenThere: bug-guile@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.bugs:3905 Archived-At: URL: Summary: Function declarators with empty parentheses should not be used Project: Guile Submitted by: civodul Submitted on: Monday 06/23/2008 at 11:45 Category: None Severity: 4 - Important Item Group: None Status: None Privacy: Public Assigned to: None Open/Closed: Open Discussion Lock: Any _______________________________________________________ Details: Hello, In Guile 1.8 and earlier, `scm_c_define_gsubr ()', `gh_new_procedure ()' and related functions take a function pointer as an argument, where the function type uses empty parentheses (which means that the function can have any prototype, provided the return type matches). Function declarators with empty parentheses are not available in C++ [0] and are an obsolescent feature as of C99 (Section 6.11.6); it also break when GCC's `-Wstrict-prototypes' option is used [1]. Therefore, Guile's API should eventually (e.g., in the next major release) be changed to use a different function pointer type. Hopefully, the change can be made almost transparent for applications that use `guile-snarf'. Thanks, Ludovic. [0] http://article.gmane.org/gmane.lisp.guile.user/6613 [1] http://thread.gmane.org/gmane.comp.encryption.gpg.gnutls.devel/2118 _______________________________________________________ Reply to this item at: _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/