Pular para o conteúdo principal
Renesas Brasil - Knowledgebase

memcpy Function in Standard Math Library_CC-RL

Last Updated:02/28/2018


Even when [Use standard/mathematical libraries] is set to [No] and [Use runtime libraries] is set to [No] in the CS+ integrated development environment, if "structure = structure" is stated and the function body is provided with "memcpy" used as a user function name, why is the memcpy function called rather than an error?


When "structure = structure" is stated, the compiler generates a code to call the memcpy function. 
When [Use runtime libraries] is set to [No], the runtime library is not used and if a user has defined a function, the user function is called.
The notes described in the user's manual assume that a user uses the runtime library. Although memcpy is contained in the runtime library rather than the standard library, if a user prepares the self-coded memcpy (simply because the standard library will not be used), there is a risk that the user's self-coded memcpy is handled in a code to call the runtime library, resulting in incorrect operation. This was duly noted.
Because there is no means to determine whether memcpy or memset is a runtime library function or a user function, an error or warning cannot be issued.
Suitable Products
CS+ (formerly CubeSuite+)
C Compiler Package for RL78 Family
  • Este artigo foi útil?