Adrian Bunk <b...@debian.org> writes: > Testing c-wrapper ... > <stdin>:444:13: error: invalid "#pragma GCC warning" directive
[...] > ././ffitest.h:828: GCC exitted abnormally (at token: *eoi*) > ././ffitest.h:828: #f > ././ffitest.h:828: process 44299 exitted abnormally with exit code 256 (at > token: *eoi*) > *** ERROR: process 44299 exitted abnormally with exit code 256 > While loading "./cwrappertest.scm" at line 13 > Stack Trace: > _______________________________________ > 0 (with-error-handler (lambda (e) (let ((e e)) (%guard-rec e e ... > expanded from (guard (e ((<message-condition> e) (let ((errmsg > (make-error > at "../lib/c-wrapper/c-parser.scm":1104 > 1 (parse-macro include-dirs headers options) > at "../lib/c-wrapper/c-parser.scm":1159 > 2 (trunk) > at "../lib/c-wrapper/c-parser.scm":67 > 3 (c-parse (if (list? include-dirs) include-dirs (list include- ... > at "../lib/c-wrapper.scm":105 > Makefile:69: recipe for target 'check-c' failed > make[2]: *** [check-c] Error 70 gauche-c-wrapper fails to handle the "__glibc_macro_warning" macro included by stdio.h -> libio.h -> cdefs.h /* __glibc_macro_warning (MESSAGE) issues warning MESSAGE. This is intended for use in preprocessor macros. Note: MESSAGE must be a _single_ string; concatenation of string literals is not supported. */ #if __GNUC_PREREQ (4,8) || __glibc_clang_prereq (3,5) # define __glibc_macro_warning1(message) _Pragma (#message) # define __glibc_macro_warning(message) \ __glibc_macro_warning1 (GCC warning message) #else # define __glibc_macro_warning(msg) #endif an ugly workaround would be to skip that macro by name with something like: diff -Nur gauche-c-wrapper-0.6.1.orig/lib/c-wrapper/c-parser.scm gauche-c-wrapper-0.6.1/lib/c-wrapper/c-parser.scm --- gauche-c-wrapper-0.6.1.orig/lib/c-wrapper/c-parser.scm 2009-08-08 16:44:52.000000000 +0200 +++ gauche-c-wrapper-0.6.1/lib/c-wrapper/c-parser.scm 2017-11-24 21:57:47.071382470 +0100 @@ -1115,7 +1115,10 @@ (raise e)))) (call-with-gcc-io include-dirs headers options (lambda (in out) - (let ((macro-list (queue->list (macro-queue)))) + (let ((macro-list (filter (lambda(x) + (not (string=? (car x) + "__glibc_macro_warning(message)"))) + (queue->list (macro-queue))))) (for-each (lambda (macro-def) (display (car macro-def) out) (newline out))