The default standards of gcc is gnu89 and g++ is gnu++98. To check the default values in the command line, please use the following corresponding commands. gcc: nds32le-elf-gcc -E -dM - < /dev/null | grep __STDC_VERSION__ The absent of output represents gnu89. If the output is “#define __STDC_VERSION__ 201112L”, it represents the standard is gnu11. g++: nds32le-elf-g++ -E -dM -x c++ /dev/null | grep -F __cplusplus If the output is “#define __cplusplus 199711L”, the standard is gnu++98 If the output is “#define __cplusplus 201103L”, the standard is gnu++11 --------------- C99 should support the types: uint8_t, uint16_t and uint32_t, the header stdint.h should be included.
Attachments: |
![Compiler_C99_stdint.png](./download/file.php?id=1391&t=1&sid=fd1964d7cdb1ed9913bf8cd3f555204c)
Compiler_C99_stdint.png [ 122.22 KiB | Viewed 17810 times ]
|
|