From: SourceForge.net <no...@so...> - 2005-10-18 22:14:46
|
Bugs item #1330211, was opened at 2005-10-19 10:53 Message generated for change (Settings changed) made by dannysmith You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=102435&aid=1330211&group_id=2435 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. >Category: mingw runtime Group: None Status: Open Resolution: None Priority: 2 Submitted By: Danny Smith (dannysmith) >Assigned to: Nobody/Anonymous (nobody) Summary: Default lconv table wrong with --unsigned-char Initial Comment: 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 ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=102435&aid=1330211&group_id=2435 |