[arm-gnu-toolchain-11.3.rel1-x86_64-arm-none-eabi] Wrong Newlib version strings, error when stdlib.h is included


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. */

/* The newlib major version number. */

/* The newlib minor version number. */

/* The newlib patch level. */

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

Hope this will be fixed soon.

Vadim Barshaw

Parents Reply Children