From: SourceForge.net <no...@so...> - 2007-04-13 13:51:53
|
Bugs item #1699543, was opened at 2007-04-12 15:05 Message generated for change (Comment added) made by arcanum You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=520074&aid=1699543&group_id=68108 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: None Group: None >Status: Closed Resolution: Rejected Priority: 5 Private: No Submitted By: Jörg Hohensohn (hohensoh) >Assigned to: Eric Weddington (arcanum) Summary: <avr/boot.h> minor flaw prevents -mint8 compilation Initial Comment: Within avr/boot.h, the line #elif (FLASHEND > USHRT_MAX) should rather be #elif (FLASHEND > UINT16_MAX) because when compiling with -mint8 USHRT_MAX becomes half and as a result the wrong functions get selected. ---------------------------------------------------------------------- >Comment By: Eric Weddington (arcanum) Date: 2007-04-13 07:51 Message: Logged In: YES user_id=543419 Originator: NO It is not being "sabotaged". There has been *zero* work done to support -mint8. <avr/boot.h> was originally written years ago. If you would like to have avr-libc support -mint8 then please write about it on the avr-libc-dev mailing list and submit patches to the avr-libc project. Patches are always welcome! ---------------------------------------------------------------------- Comment By: Jörg Hohensohn (hohensoh) Date: 2007-04-13 04:56 Message: Logged In: YES user_id=741001 Originator: YES Sorry for nagging/nitpicking, I know -mint8 is "not really supported" by avr-libc, but on the other hand we don't need to sabotage it... What can be bad about replacing this USHRT_MAX with UINT16_MAX? Comes closer to the original intention, namely to check if the addressing is 16 bit or above. IMHO it is formally wrong now, works by chance while a short is 16 bit, becomes visible as a bug when using -mint8. -mint8 helps a lot to make the code smaller, especially important for bootloaders. An this is the situation where one wants to use boot.h. ---------------------------------------------------------------------- Comment By: Eric Weddington (arcanum) Date: 2007-04-12 15:15 Message: Logged In: YES user_id=543419 Originator: NO In the avr-libc user manual here: <http://www.nongnu.org/avr-libc/user-manual/using_tools.html#using_avr_gcc> about the options available for avr-gcc, it says: * -mint8 Assume int to be an 8-bit integer. Note that this is not really supported by avr-libc, so it should normally not be used. The default is to use 16-bit integers. So the solution is: don't use -mint8. However, I agree that this should be more prominent in the documentation of avr-libc. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=520074&aid=1699543&group_id=68108 |