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

 
 
Show feedback again

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

Submitted by:  Ludovic Courtès <civodul>
Submitted on:  Mon 23 Jun 2008 11:45:45 AM UTC  
 
Category: NoneSeverity: 4 - Important
Item Group: NoneStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Open

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

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>
Project Administrator

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter 421 here (basic anti-spam test):

     

     

    No Changes Have Been Made to This Item
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup