Finally got around to upgrading to 1.33.1 on HP 11i, g++ 4.1.1. in v4/regex_traits_defaults.hpp, the compiler was not happy with the WCHAR_MIN == 0 and WCHAR_MAX <= USHRT_MAX checks. This appears to be due to their definition: #define WCHAR_MIN (wchar_t)0 #define WCHAR_MAX (wchar_t)UINT_MAX I tried a few things I could think of, but ended up undef'ing and redefining them without the (wchar_t). Tom Matelich
Thomas Matelich wrote:
Finally got around to upgrading to 1.33.1 on HP 11i, g++ 4.1.1.
in v4/regex_traits_defaults.hpp, the compiler was not happy with the WCHAR_MIN == 0 and WCHAR_MAX <= USHRT_MAX checks. This appears to be due to their definition: #define WCHAR_MIN (wchar_t)0 #define WCHAR_MAX (wchar_t)UINT_MAX
I tried a few things I could think of, but ended up undef'ing and redefining them without the (wchar_t).
Those definitions don't conform to the std sadly :-( The std *requires* those names to be usable in preprocessor definitions, not that that helps you much at this time! Can you please report this as a bug to whoever is responsible (HP or gcc)? Many thanks. BTW the trick to fix issues like this is to use something like: #define WCHAR_MIN (wchar_t)+0 #define WCHAR_MAX (wchar_t)+UINT_MAX which does the right thing in both preprocessing and compiler phases. And finally, there is a workaround for this in 1.34 already :-) Thanks for the report, John.
On 8/5/06, John Maddock
Thomas Matelich wrote:
Finally got around to upgrading to 1.33.1 on HP 11i, g++ 4.1.1.
in v4/regex_traits_defaults.hpp, the compiler was not happy with the WCHAR_MIN == 0 and WCHAR_MAX <= USHRT_MAX checks. This appears to be due to their definition: #define WCHAR_MIN (wchar_t)0 #define WCHAR_MAX (wchar_t)UINT_MAX
And finally, there is a workaround for this in 1.34 already :-)
Ahh, I looked in CVS but didn't look closely enough at the 1.9 diff to see that it encompassed the offending areas. The definition is in /usr/include/wchar.h, so I'd say your #ifndef __HP_aCC should probably be #ifndef __hpux for completeness. Tom
Thomas Matelich wrote:
Ahh, I looked in CVS but didn't look closely enough at the 1.9 diff to see that it encompassed the offending areas. The definition is in /usr/include/wchar.h, so I'd say your #ifndef __HP_aCC should probably be #ifndef __hpux for completeness.
Doesn't the !defined(__osf__) && !defined(__OSF__) take care of it? Thanks, John.
participants (2)
-
John Maddock
-
Thomas Matelich