Forum : ST7/STM8
Original Post
Post Information | Post |
---|---|
October 29, 2010 - 6:21pm
|
The compiler fails to recognize const array parameters passed to const actual parameters of functions, e.g.: void func(const int actual[]) const int formal[1] = {0}; main() I must cast (int*)formal everywhere to avoid the fake error. Very ugly! scanf function still not implemented on STM8 libraries! What a missing for a professional product! Regards. Giorgio |
Hi Giorgio,
We rpoperly reproduced the problem in our Labs. It looks like the compiler does not keep the "const" qualifier in "const int actual[]".
We will investigate and fix this, however it will not be fixed in the next release of the RKit-STM8, which is due this week.
The scanf function is not available for STM8, but we will add it in a future release. Not many people use it as it has a huge footprint, it is usually more efficient to use a hand-made strtoint than to use scanf. If you want a nice string-to-int conversion routine you can get it from the CircleOS sources at http://www.stm32circle.com.
Regards,
Bruno