Danny Smith
-
2005-10-18
- labels: 380073 --> mingw runtime (deprecated use WSL)
- assigned_to: earnie --> nobody
This testcase:
#include <locale.h>
#include <limits.h>
#include <assert.h>
int main( void )
{
struct lconv* p_lconv0 = localeconv();
/* ANSI says this is the default initialization
for this and several other fields, */
assert (p_lconv0->frac_digits == CHAR_MAX);
return 0;
}
suceeds if compiled with signed char (the default)
but fail if -funsigned-char is addred to compiler flags.
When compled with MS cl using /J switch (equivalent
to -funsigned-chars) the test succeeds
This is a startup code problem. Somehow, the
preprocessor define __UNSIGNED_CHAR__ needs to
trigger a call to a constructor that initializes the default
lconv fields to UCHAR_MAX,
Danny