bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

string.h:82: error: expected `,' or `...' before "__dest"


From: Daniel Martin
Subject: string.h:82: error: expected `,' or `...' before "__dest"
Date: Sat, 31 May 2008 21:27:07 +0100

Hi guys,

I've come across what appears to be a small bug in string_.h. When
cross-compiling my program from x86_64-linux-gnu to i386-mingw32 I get
this error:

 i386-mingw32-g++ -DHAVE_CONFIG_H -I. -I../../..
-I../../../../../src/guis/wxwidgets -I../../../../../gnulib/src
-I../../../gnulib/src -I/home/dan/usr/cross/i386-mingw32/include
-I/home/dan/usr/cross/i386-mingw32//lib/wx/include/msw-ansi-release-2.8
-I/home/dan/usr/cross/i386-mingw32//include/wx-2.8 -DWXUSINGDLL
-D__WXMSW__ -mthreads -ggdb3 -Wall
-I/home/dan/usr/cross/i386-mingw32/include -MT
libwxwidgetsgui_la-vec2.lo -MD -MP -MF .deps/libwxwidgetsgui_la-vec2.Tpo
-c ../../../../../src/guis/wxwidgets/vec2.cpp -o
libwxwidgetsgui_la-vec2.o
In file included
from 
/home/dan/usr/cross/lib/gcc/i386-mingw32/3.4.5/../../../../include/c++/3.4.5/cstring:51,

from 
/home/dan/usr/cross/lib/gcc/i386-mingw32/3.4.5/../../../../include/c++/3.4.5/i386-mingw32/bits/c++locale.h:42,

from 
/home/dan/usr/cross/lib/gcc/i386-mingw32/3.4.5/../../../../include/c++/3.4.5/iosfwd:46,

from 
/home/dan/usr/cross/lib/gcc/i386-mingw32/3.4.5/../../../../include/c++/3.4.5/ios:44,

from 
/home/dan/usr/cross/lib/gcc/i386-mingw32/3.4.5/../../../../include/c++/3.4.5/ostream:45,

from 
/home/dan/usr/cross/lib/gcc/i386-mingw32/3.4.5/../../../../include/c++/3.4.5/iostream:45,
                 from ../../../../../src/guis/wxwidgets/vec2.h:6,
                 from ../../../../../src/guis/wxwidgets/vec2.cpp:1:
../../../gnulib/src/string.h:82: error: expected `,' or `...' before
"__dest"

Now, string.h is generated from string_.h and line 82 seems to
correspond to string.h's line 53:

extern void *mempcpy (void *restrict __dest, void const *restrict __src,
                      size_t __n);

Now I can work around this by simply deleting `__dest' and `__src' from
the snippet above, but that is hardly the correct way to fix this.

Another thing which seems to fix this issue is to replace `restrict'
with `__restrict' as seems to be done in argp.h for instance. (In fact I
seem to remember having to delete argument names from argp.h in the
past.) ie.

extern void *mempcpy (void *__restrict __dest, void const *__restrict
__src,
                      size_t __n);

But as I'm not a gnulib developer I'm not certain if this is the correct
fix either. If it is, do the many other  instances of `restrict' in
string_.h need to be altered too?

I hope this is helpful!

Kind regards,



Daniel Martin. (dacm)

PS: If it's not too much trouble could any replies be CC'd to me, as I
don't subscribe to this list.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]