Page 1 of 1

Bug in newlib/include/ctype.h with vbcc

PostPosted: Sun May 07, 2017 3:28 pm
by phx
There is a longstanding bug in Newlib's ctype.h when used with vbcc:
The asm_toupper and asm_tolower macros use __ctype_ptr as the address of the ctype-array, although it is a pointer. You have to replace
addi 11,11,__ctype_ptr@l
by
lwz 11,__ctype_ptr@l(11)

Please, anybody fix that for the next SDK!

Re: Bug in newlib/include/ctype.h with vbcc

PostPosted: Sat Jun 17, 2017 8:13 pm
by salass00
In the latest beta version of newlib the ctype.h file has "(_ctype_+1)" instead of "__ctype_ptr" in this code so it should be working correctly.

I changed this about a year ago according to an old bugzilla report.