From: SourceForge.net <no...@so...> - 2006-10-29 18:57:21
|
Support Requests item #1586760, was opened at 2006-10-29 09:17 Message generated for change (Comment added) made by jesusc You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=200599&aid=1586760&group_id=599 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: Pending Priority: 5 Private: No Submitted By: BNOLL (bnollmeyer) Assigned to: Nobody/Anonymous (nobody) Summary: SDCC Warning 187 occurs in malloc.h Initial Comment: Since Version 2.6 SDCC is reporting a warning 187: ISO C90 does not support flexible array members. The warning is related to malloc.h. The warning can be reproduced by using itoa, atoi, ltoa ... so please have a try. ---------------------------------------------------------------------- >Comment By: Jesus Calvino-Fraga (jesusc) Date: 2006-10-29 10:57 Message: Logged In: YES user_id=603650 >In general it is not recommended to use malloc in a small embedded system in the first place. Why? That is for the user to decide, not the compiler. I recently used malloc/realloc/free in a 8051 program and it worked extremelly well! In fact, I used working code compiled with MSVC and easily ported it to sdcc. With malloc() one can really take advantage of the limited memory of an embedded system. Jesus ---------------------------------------------------------------------- Comment By: Philipp Krause (spth) Date: 2006-10-29 10:02 Message: Logged In: YES user_id=564030 Warning exist to warn the user that he's likely to have done something wrong. Warnings caused by compiler internals, such as the implementation of malloc.h are not helpful, they just distract from the warnings that have meaning to the user. ---------------------------------------------------------------------- Comment By: Maarten Brock (maartenbrock) Date: 2006-10-29 09:53 Message: Logged In: YES user_id=888171 And the question is...? In general it is not recommended to use malloc in a small embedded system in the first place. And allthough C90 does not support flexible array members, SDCC handles them perfectly. If you compile with --std-c99 or --std-sdcc99 you will not get the warning. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=200599&aid=1586760&group_id=599 |