On Monday 06 August 2007 14:52, Duncan McQueen wrote:
> In file included from C:/MinGW-4.2.1/include/stdio.h:407,
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0from
> C:\Projects\Third-Party\curl-7.16.4\lib\/setup.h:157, from
> C:/MinGW-4.2.1/include/sys/types.h:104: error: two or more data types
> in declaration specifiers
> C:/MinGW-4.2.1/include/sys/types.h:104: warning: useless type name in
> empty declaration
> The offending code in types.h is :
> #ifndef =A0 _NO_OLDNAMES
> typedef _ssize_t ssize_t;
> #endif /* Not _SSIZE_T_ */
Hmm. This may not be the offending code -- have you validated your=20
hypothesis, with a minimal test case? This (as a stand alone unit)...
typedef long _ssize_t;
typedef _ssize_t ssize_t;
ssize_t x =3D 0;
compiles cleanly for me, with both GCC-4.0.2 on OpenSUSE-10.0, and=20
GCC-4.0.3 on Ubuntu-6.06. If it does likewise for you, with your=20
unofficial GCC-4.2.1, then the *real* source of the error must lie=20
elsewhere -- perhaps an earlier define in some header included *before*=20
sys/types.h -- e.g. I can reproduce your error message (exactly) by=20
#define ssize_t long
before the first line of the above test case.
> If I comment out the offending code, the compile works. =A0If I use the
> MinGW release version of GCC, the compile works.
> Any thoughts? =A0Or is this another reason why 4.2.1 is not part of
> MinGW's release?
> > On 8/6/07, Greg Chicares <chicares@...> wrote:
> > > Indeed, gcc-4.x is stricter, for C++ at least. Though I develop
> > > only under msw, I work with people who build my code under *nix
> > > (with gcc-4.x), and I've had to make several corrections to fix
> > > confirmed problems that gcc-4.x has uncovered.
> Looking closer - it is in types.h provided by mingw-runtime. =A0Which
> means that, assuming what I see is not a bug but the stricter
> compliance required by 4.2.1, this file will eventually need to change
> (in anticipation of any future MinGW release under the 4.2 or 4.3
Perhaps, but please confirm, with a minimal test case, that this is=20
true, and that you are not sending us on a wild goose chase because of=20
some other problem in your code base.