[gambit-list] How to use define-syntax and cond-expand in one program?

Sven Hartrumpf hartrumpf at gmx.net
Fri Jun 29 10:51:33 EDT 2012


Hi.

Fri, 29 Jun 2012 10:28:45 -0400, feeley wrote:
> Can you give more details on the nature of the error.

Sure. Here is a small (mostly) minimal example:

> cat top.scm
(include "srfi1.scm")
(define-cond-expand-feature srfi-1)
(include "part.scm")
(write (first '(a)))

> cat srfi1.scm
(define (first l) (car l))

> cat part.scm
(cond-expand
 ((not srfi-1)
  (define (first l) (car l)))
(else))

> gsc -:s top.scm
top.c: In function '___H__20_top_2e_o2':
top.c:178:1: error: duplicate label '___L0_first'
top.c:141:1: note: previous definition of '___L0_first' was here
top.c:181:1: error: duplicate label '___L_first'
top.c:144:1: note: previous definition of '___L_first' was here
top.c:188:1: error: duplicate label '___L2_first'
top.c:151:1: note: previous definition of '___L2_first' was here
top.c:190:1: error: duplicate label '___L1_first'
top.c:153:1: note: previous definition of '___L1_first' was here
top.c:192:1: error: duplicate label '___L3_first'
top.c:155:1: note: previous definition of '___L3_first' was here

Ciao
Sven



More information about the Gambit-list mailing list