[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: new module 'c++defs'
From: |
Bruno Haible |
Subject: |
Re: new module 'c++defs' |
Date: |
Tue, 23 Feb 2010 10:51:47 +0100 |
User-agent: |
KMail/1.9.9 |
John W. Eaton wrote:
> #define GNULIB_NAMESPACE gnulib
>
> to Octave's config.h file, I first saw this error:
>
> libtool: compile: g++ -DHAVE_CONFIG_H -I. -I/home/jwe/src/octave/liboctave
> -I.. -I../libgnu -I/home/jwe/src/octave/libgnu
> -I/home/jwe/src/octave/libcruft/misc -ggdb3 -DHAVE_CONFIG_H
> -I/usr/include/freetype2 -Wall -W -Wshadow -Wold-style-cast -Wformat -ggdb3
> -pthread -ggdb3 -MT liboctave_la-CollocWt.lo -MD -MP -MF
> .deps/liboctave_la-CollocWt.Tpo -c /home/jwe/src/octave/liboctave/CollocWt.cc
> -fPIC -DPIC -o .libs/liboctave_la-CollocWt.o
> In file included from /usr/include/c++/4.4/cstring:45,
> from /home/jwe/src/octave/liboctave/oct-mem.h:27,
> from /home/jwe/src/octave/liboctave/idx-vector.h:37,
> from /home/jwe/src/octave/liboctave/Array.h:36,
> from /home/jwe/src/octave/liboctave/Array2.h:32,
> from /home/jwe/src/octave/liboctave/MArray2.h:28,
> from /home/jwe/src/octave/liboctave/dMatrix.h:27,
> from /home/jwe/src/octave/liboctave/CollocWt.h:29,
> from /home/jwe/src/octave/liboctave/CollocWt.cc:30:
> ../libgnu/string.h:223: error: no matches converting function 'memchr' to
> type 'void* (* const)(const void*, int, size_t)'
> /usr/include/string.h:74: error: candidates are: void* memchr(void*, int,
> size_t)
> /usr/include/string.h:76: error: const void* memchr(const
> void*, int, size_t)
> ../libgnu/string.h:292: error: no matches converting function 'memrchr' to
> type 'void* (* const)(const void*, int, size_t)'
> /usr/include/string.h:114: error: candidates are: void* memrchr(void*, int,
> size_t)
> /usr/include/string.h:116: error: const void* memrchr(const
> void*, int, size_t)
>
> I got past this problem by changing the declared return types for
> memchr and memrchr in gnulib/lib/string.in.h to be "const void *"
> instead of "void *".
Oh. I'll need two invocations of _GL_CXXALIAS_SYS here. It gets tricky.
> The next problem I encountered was
>
> libtool: compile: g++ -DHAVE_CONFIG_H -I. -I/home/jwe/src/octave/liboctave
> -I.. -I../libgnu -I/home/jwe/src/octave/libgnu
> -I/home/jwe/src/octave/libcruft/misc -ggdb3 -DHAVE_CONFIG_H
> -I/usr/include/freetype2 -Wall -W -Wshadow -Wold-style-cast -Wformat -ggdb3
> -pthread -ggdb3 -MT liboctave_la-oct-glob.lo -MD -MP -MF
> .deps/liboctave_la-oct-glob.Tpo -c /home/jwe/src/octave/liboctave/oct-glob.cc
> -fPIC -DPIC -o .libs/liboctave_la-oct-glob.o
> In file included from /home/jwe/src/octave/liboctave/oct-glob.cc:31:
> ../libgnu/glob.h:215: internal compiler error: in start_decl, at
> cp/decl.c:4231
> Please submit a full bug report,
> with preprocessed source if appropriate.
> See <file:///usr/share/doc/gcc-4.4/README.Bugs> for instructions.
Oops, the g++ bug is hitting. This should fix it.
Anything else?
Bruno
--- lib/glob.in.h.orig Tue Feb 23 10:50:17 2010
+++ lib/glob.in.h Tue Feb 23 10:47:14 2010
@@ -72,8 +72,7 @@
# undef glob_pattern_p
_GL_CXXALIAS_RPL (glob, int, (const char *_Restrict_ __pattern, int __flags,
int (*__errfunc) (const char *, int),
- glob_t *_Restrict_ __pglob)
- __THROW _GL_ARG_NONNULL ((1, 4)));
+ glob_t *_Restrict_ __pglob));
_GL_CXXALIAS_RPL (globfree, void, (glob_t *__pglob));
_GL_CXXALIAS_RPL (glob_pattern_p, int, (const char *__pattern, int __quote));
#endif