We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hello,
Toolchain arm-gnu-toolchain-11.3.rel1-x86_64-arm-none-eabi, downloaded from developer.arm.com/.../arm-gnu-toolchain-downloads
The following include:
#include <stdlib.h>
causes the error:
token "@" is not valid in preprocessor expressions
The reason is include/_newlib_version.h file, the Newlib version strings are defined as follows:
/* The newlib version in string format. */ #define _NEWLIB_VERSION "@NEWLIB_VERSION@" /* The newlib major version number. */ #define __NEWLIB__ @NEWLIB_MAJOR_VERSION@ /* The newlib minor version number. */ #define __NEWLIB_MINOR__ @NEWLIB_MINOR_VERSION@ /* The newlib patch level. */ #define __NEWLIB_PATCHLEVEL__ @NEWLIB_PATCHLEVEL_VERSION@
For the record, gcc-arm-11.2-2022.02-x86_64-arm-none-eabi has the following defines:
#define _NEWLIB_VERSION "4.1.0" #define __NEWLIB__ 4 #define __NEWLIB_MINOR__ 1 #define __NEWLIB_PATCHLEVEL__ 0
Hope this will be fixed soon.
Vadim Barshaw
This error is also present in gcc 12.2 toolchain.