1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-20 19:50:24 +02:00

Make `SCM' type definition acceptable for C++ compilers.

* libguile/tags.h (SCM) [SCM_DEBUG_TYPING_STRICTNESS == 1]: Use a named
  struct to avoid errors from C++ compilers such as "error: non-local
  function ‘<anonymous struct>* foo(<anonymous struct>*)’ uses anonymous
  type".  This fixes a regression introduced in
  c6054feaf0 ("Add support for static
  allocation of cells, strings and stringbufs.").  Reported by Linas
  Vepstas <linasvepstas@gmail.com>.
This commit is contained in:
Ludovic Courtès 2009-11-29 16:45:38 +01:00
parent 8b22ed7abd
commit 8a30946f7f

View file

@ -82,7 +82,7 @@ typedef scm_t_uintptr scm_t_bits;
/* This is the default, which provides an intermediate level of compile time /* This is the default, which provides an intermediate level of compile time
* type checking while still resulting in very efficient code. * type checking while still resulting in very efficient code.
*/ */
typedef struct { char scm_unused_field; } * SCM; typedef struct scm_unused_struct { char scm_unused_field; } *SCM;
/* /*
The 0?: constructions makes sure that the code is never executed, The 0?: constructions makes sure that the code is never executed,