|
From: Oscar F. <of...@wa...> - 2004-12-18 14:50:36
|
"Paul Grenyer" <pa...@pa...> writes:
> Hi All
>
> The following code does not cause any sort of error or warning with MSVC7.1:
>
> throw TestFailure( Print< IsStreamable< T >::result &&
> IsStreamable< U >::result,
> IsEqualFunc >::Out< T, U >( lhs, rhs,
> lhscode, rhscode ),
> line, file );
>
> but with MinGW 3.2.3 I get:
>
> g++ -W -Wall -Werror -pedantic -Wcast-qual -Wcast-align -Wwrite-strings -Winline
> -finline-limit=1048576 -g3 -c -o testfuncs.o ../src/testfuncs.cpp
> -I../include
> In file included from ../include/aeryn/testfuncs.h:6,
> from ../src/testfuncs.cpp:1:
> ../include/aeryn/isequal.h: In function `void Aeryn::IsEqual(const T&, const
> U&, const char*, const char*, long unsigned int, const char*)':
> ../include/aeryn/isequal.h:131: parse error before `,' token
> ../include/aeryn/isequal.h: In function `void Aeryn::IsNotEqual(const
> T&, const
>
> U&, const char*, const char*, long unsigned int, const char*)':
> ../include/aeryn/isequal.h:154: parse error before `,' token
> ../src/testfuncs.cpp:2:29: no newline at end of file
> c:\MinGW\bin\mingw32-make.exe[1]: *** [testfuncs.o] Error 1
>
> I'm totally stumped. Let me know if you need to see more of the code.
Usually, this is related to stricter standards conformance by g++. On
your case, maybe there is a `typename' missing, like this:
throw TestFailure( typename Print< IsStreamable< T >::result &&
IsStreamable< U >::result,
IsEqualFunc >::Out< T, U >( lhs, rhs,
lhscode, rhscode ),
line, file );
but it is hard to say for sure. We need a complete test case. (As
short as possible).
You could try gcc 3.4.x to see if it is a bug on 3.2.x.
OTOH, this error:
../src/testfuncs.cpp:2:29: no newline at end of file
has an obvious fix. The C & C++ standards requires a newline at the
end of each translation unit.
--
Oscar
|