bugGuile - Bugs: bug #23681, Function declarators with empty...

 
 

bug #23681: Function declarators with empty parentheses should not be used

Submitter:  Ludovic Courtès <civodul>
Submitted:  Mon 23 Jun 2008 11:45:45 AM UTC
   
 
Category:  None Severity:  4 - Important
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  civodul
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Sun 13 Feb 2011 01:54:35 PM UTC, comment #2: 

Fix in commit be90d0b6f9e79bc882b2289bf0a5ea1b3c082b3c.

Ludovic Courtès <civodul>
Group administrator
Wed 18 Aug 2010 01:51:07 PM UTC, comment #1: 
Ludovic Courtès <civodul>
Group administrator
Mon 23 Jun 2008 11:45:45 AM UTC, original submission:  

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

Ludovic Courtès <civodul>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by civodul (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2011-02-13 civodul StatusNone Fixed
        Open/ClosedOpen Closed
    2011-02-13 civodul Assigned toNone civodul

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code