Mark H Weaver <[email protected]> skribis: > Here's the definition of SCM_VARIABLE from snarf.h: > > #define SCM_VARIABLE(c_name, scheme_name) \ > SCM_SNARF_HERE(static SCM c_name) \ > SCM_SNARF_INIT(c_name = scm_c_define (scheme_name, SCM_BOOL_F);) > > When guile-snarf is run to generate ports.x, SCM_MAGIC_SNARF_INITS is > defined, so the following definitions are active: > > # define SCM_SNARF_HERE(X) > # define SCM_SNARF_INIT_PREFIX ^^ > # define SCM_SNARF_INIT(X) SCM_SNARF_INIT_PREFIX X ^:^ > # define SCM_SNARF_DOCS(TYPE, CNAME, FNAME, ARGLIST, REQ, OPT, VAR, DOCSTRING) > > So you might expect the definition of 'default_conversion_strategy_var' > in ports.c to expand into something like this: > > ^^ default_conversion_strategy_var = scm_c_define > ("%default-port-conversion-strategy", SCM_BOOL_F); ^:^ > > However, clang -E inserts 6 newlines between the open paren and the open > quote above. Unfortunately, afaict, the 'sed' script in the > 'modern_snarf' function in 'guile-snarf' cannot cope with any newlines > between the "^^" and "^:^".
Woow, good catch! It’s surprising no other C compiler out there ever had this problem. Ludo’.
