RT-Thread / RT-Thread/rt-thread
[Bug] nano版本编译提示 error: #20: identifier "va_list" is undefined
Open
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 12.2k
- Forks
- 5.4k
- Avg merge
- 4d 12h
- Merged PRs (30d)
- 40
Description
RT-Thread Version
nano, master
Hardware Type/Architectures
cortex M0
Develop Toolchain
MDK Keil
Describe the bug
- 在源码基础上,按照nano移植方法移植。
- 移植完编译提示 error: #20: identifier "va_list" is undefined
- 原因是未包含<stdarg.h>,解决方案之一是在rtconfig.h 中 #define RT_USING_LIBC。正常应该是不需要定义这个宏
- 在rtdef.h中源码如下:
- #ifdef RT_USING_LIBC
#include <stdint.h>
#include <stddef.h>
#include <stdarg.h>
Other additional context
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with rtdef.h and rtconfig.h in the nano configuration, then reproduce the Cortex-M0 build using MDK Keil. Check how va_list is made available when RT_USING_LIBC is not defined. Done means the nano source compiles without requiring that workaround.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- build-system, embedded-iot, operating-systems
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100