Bruno Haible via Gnulib discussion list <[email protected]> writes:

> When compiling GNU clisp with clang++, I see this error:
>
> .../gllib/string.h:1830:20: error: expected a qualified name after 'typename'
>  1830 | template <typename T> T strnul (T);
>       |                    ^
> .../clisp.h:6891:12: note: expanded from macro 'T'
>  6891 | #define T  (object{((oint)&symbol_tab_data.S_t+1UL), alloccount})
>       |            ^
>
> That's because clisp (rightfully) defines T as a macro.
>
> This patch fixes it.

The patch looks good to me.

I'm curious, though, what is the benefit of compiling a C program, like
clisp, with a C++ compiler? I would assume that a working C++ compiler
means the host has a working C compiler, at least in practice. My
understanding is that catering to this requires a bit of extra work,
e.g., adding casts to void pointers, which are necessary for C++, but
not C.

Perhaps a bit off-topic for bug-gnulib, but I figured others might be
interested as well.

Collin

Reply via email to