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

 
 

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: Fixed
Privacy: PublicAssigned to: Ludovic Courtès <civodul>
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

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

Fix in commit be90d0b6f9e79bc882b2289bf0a5ea1b3c082b3c.

Ludovic Courtès <civodul>
Project AdministratorIn charge of this item.
Wed 18 Aug 2010 01:51:07 PM UTC, comment #1:

This also breaks C++: http://lists.gnu.org/archive/html/guile-user/2010-07/msg00084.html .

Ludo’.

Ludovic Courtès <civodul>
Project AdministratorIn charge of this item.
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 AdministratorIn charge of this item.

 

(Note: upload size limit is set to 16384 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 the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 13 Feb 2011 01:54:35 PM UTCcivodulStatusNone=>Fixed
      Open/ClosedOpen=>Closed
    Sun 13 Feb 2011 11:31:11 AM UTCcivodulAssigned toNone=>civodul

    Back to the top


    Powered by Savane 3.1-cleanup1