[wx-dev] [CVS HEAD] Compile error in include/wx/datetime.h
Vadim Zeitlin
vadim at wxwindows.org
Tue Apr 3 04:51:28 PDT 2007
On Tue, 03 Apr 2007 04:18:55 +0100 Wlodek Szafran <wlodek.szafran at hwcn.org> wrote:
WS> >> due to wint_t and wxDateTime_t both being typed as short unsigned
WS> >> int.
WS> >
WS> > Yes, that appears to be the case, but for mingw-gcc *3.4*. wint_t is a
WS> > distinct type in 4.1. In other words, gcc-3.4 would be justified in
WS> > failing to compile this, but it works, while gcc-4.1 should work just
WS> > fine, but fails. I'm completely confused uby this :(
WS>
WS> It appears to me that in this case the compiler must be seeing two
WS> overloads that look the same, possibly after type promotions, and it
WS> can't decide which one to use for the comparison.
The real problem is that this can happen with other, user-defined, enums
and not just wxDateTime_t too. So we absolutely need to fix it and for this
we must understand what's going on.
WS> FWIW, the downloaded pre-built MinGW 3.4.5 compiler as well as the one I
WS> built myself from sources, both define __WINT_TYPE__ (thus wint_t) as
WS> "short unsigned int".
WS>
WS> Just curious, what do your MinGW compilers define __WINT_TYPE__ as?
As unsigned short too (I think this is the only sensible choice under
Windows anyhow). Linux g++ defines it as unsigned int. Nevertheless both of
them somehow build the current cvs sources just fine...
Regards,
VZ
More information about the wx-dev
mailing list