ID: 30558 Comment by: jorton at redhat dot com Reported By: jbarwick at sentienthealth dot com Status: Feedback Bug Type: Compile Failure Operating System: SuSE 9.1 (amd64) PHP Version: 4.3.8 New Comment:
gcc -Wall output for ext/mbstring from amd64 build of HEAD: ext/mbstring/oniguruma/regexec.c: In function `match_at': ext/mbstring/oniguruma/regexec.c:1106: warning: cast to pointer from integer of different size ext/mbstring/oniguruma/regexec.c:1110: warning: cast to pointer from integer of different size ext/mbstring/oniguruma/regexec.c:1126: warning: cast to pointer from integer of different size ext/mbstring/oniguruma/regexec.c:1130: warning: cast to pointer from integer of different size ext/mbstring/oniguruma/regexec.c:1763: warning: cast from pointer to integer of different size ext/mbstring/oniguruma/regexec.c:1777: warning: cast from pointer to integer of different size ext/mbstring/oniguruma/regexec.c:1794: warning: cast from pointer to integer of different size ext/mbstring/oniguruma/regexec.c:1800: warning: cast from pointer to integer of different size ext/mbstring/oniguruma/regexec.c:1839: warning: cast to pointer from integer of different size ext/mbstring/oniguruma/regexec.c:1843: warning: cast to pointer from integer of different size ext/mbstring/oniguruma/regexec.c:1871: warning: cast to pointer from integer of different size ext/mbstring/oniguruma/regexec.c:1875: warning: cast to pointer from integer of different size ext/mbstring/oniguruma/regexec.c:1903: warning: cast to pointer from integer of different size ext/mbstring/oniguruma/regexec.c:1907: warning: cast to pointer from integer of different size ext/mbstring/oniguruma/regexec.c:1942: warning: cast to pointer from integer of different size ext/mbstring/oniguruma/regexec.c:1946: warning: cast to pointer from integer of different size ext/mbstring/oniguruma/regexec.c:2027: warning: cast to pointer from integer of different size ext/mbstring/oniguruma/regexec.c:2050: warning: cast to pointer from integer of different size ext/mbstring/oniguruma/regexec.c:1138: warning: `pstart' might be used uninitialized in this function ext/mbstring/oniguruma/regparse.c: In function `not_code_range_buf': ext/mbstring/oniguruma/regparse.c:1628: warning: `to' might be used uninitialized in this function ext/mbstring/libmbfl/filters/mbfilter_htmlent.c: In function `mbfl_filt_conv_html_dec_ctor': ext/mbstring/libmbfl/filters/mbfilter_htmlent.c:161: warning: cast from pointer to integer of different size ext/mbstring/libmbfl/filters/mbfilter_htmlent.c: In function `mbfl_filt_conv_html_dec_dtor': ext/mbstring/libmbfl/filters/mbfilter_htmlent.c:169: warning: cast to pointer from integer of different size ext/mbstring/libmbfl/filters/mbfilter_htmlent.c: In function `mbfl_filt_conv_html_dec': ext/mbstring/libmbfl/filters/mbfilter_htmlent.c:178: warning: cast to pointer from integer of different size ext/mbstring/libmbfl/filters/mbfilter_htmlent.c: In function `mbfl_filt_conv_html_dec_flush': ext/mbstring/libmbfl/filters/mbfilter_htmlent.c:249: warning: cast to pointer from integer of different size Previous Comments: ------------------------------------------------------------------------ [2004-11-04 13:09:36] [EMAIL PROTECTED] Please, provide all warnings and/or errors you get. ------------------------------------------------------------------------ [2004-10-26 09:41:03] jbarwick at sentienthealth dot com Description: ------------ The entire MBREGEX.C object appears to be written with "pointer address math" using "int" variables. Whereas we all know that with the invent of i586/i686 systems the int veriable is nicely 32 bit, in a 64 bit environment, the pointers and the uint/int objects become completely incompatible. (Am I crazy here?)...or completely stupid? Anyway...lot's of "pointer errors" in mbstring/mbregex. It appears that this module is totally unusable in a 64-bit environment. To FIX, I did the following mbstring/mbregex/mbregex.h #define MINT long #define MLONG long The changed all "int"'s to "MINT" and changed all "long"'s to "MLONG" with a nice search and replace. Compiled with no compiler warnings (retesting make clean/make as we speak). It actually appears that the entire mbstring object must be completely re-written. SOOOO much pointer math using int's and so many "cast from pointer to integer of different size" errors. any chance of getting 4.3.9 or 4.3.10 compilable for 64-bit? I have a lot of work left to fix all the mbstring files that wont compile correctly...errrrg!!! PLEASE someone tell me I can ignore these because the pointer math works even when the compiler complains!! Reproduce code: --------------- compile mbstring/mbregex.c Expected result: ---------------- no compiler warnings about bad pointers Actual result: -------------- compiler warnings about bad pointers ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=30558&edit=1