View Issue Details

IDProjectCategoryView StatusLast Update
0017202CentOS-8guilepublic2020-03-30 17:58
Reporterjcbollinger Assigned To 
Status newResolutionopen 
Product Version8.1.1911 
Summary0017202: guile1.8-snarf emits broken output
Descriptionguile1.8-snarf, the version of guile-snarf packaged with the Guile1.8 compatibility devtools (compat-guile18-devel), consistently produces broken output. For example, given an input C source file with this content:

#include <libguile.h>
SCM stest_object_new (SCM, SCM);
SCM_PROC (s_object_new, "test-object-new", 1, 0, 1, stest_object_new);

it emits this faulty output:

/* cpp arguments: test.c */
 scm_c_define_gsubr (

When there are multiple declarations to snarf, a broken declaration is emitted for each one.

The correct output would be something substantially equivalent to this:

/* cpp arguments: test.c */
scm_c_define_gsubr ( s_object_new , 1, 0, 1, (SCM (*)()) stest_object_new) ;

, which is what guile-snarf v1.8.7 of CentOS 6 emits.
Steps To Reproduce
$ cat >test.c <<'EOF'
#include <libguile.h>
SCM stest_object_new (SCM, SCM);
SCM_PROC (s_object_new, "test-object-new", 1, 0, 1, stest_object_new);

$ guile1.8-snarf test.c
Additional InformationThe guile-snarf program from the main guile-devel package appears to produce acceptable output for the example case, so it may be usable as a workaround. It is difficult to be certain that that v2.0 implementation will produce output correct for v1.8 under all circumstances, however.


There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2020-03-30 17:58 jcbollinger New Issue
2020-03-30 17:58 jcbollinger Tag Attached: bug