SDCC's preproccessor is currently based on the one from gcc 4.6.3. Current gcc version in 5.2. Merging a new upstream version will make it much easier to fix bug #2425.
This turns out to be more complicated than expected. A lot of coding-style modifictions make it hard to find the differences that really matter. And while the libcpp stuff is based on gcc 4.6.3, the rest is based on even older upstream versions.
Philipp
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
At some point we'll want to update to get better support for newer standards. The LLVM preprocessor might be an alternative. There also is Wave in boost, but it apparently supports C99 only (i.e. no C89, C11 or C2X).
Philipp
P.S.: The LLVM preprocessor infrastructure has a reputation for being easy to use, but it depends on most of the rest of LLVM. So libcpp from GCC 10 or 11 looks like out best choice here.
Last edit: Philipp Klaus Krause 2021-04-07
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This turns out to be more complicated than expected. A lot of coding-style modifictions make it hard to find the differences that really matter. And while the libcpp stuff is based on gcc 4.6.3, the rest is based on even older upstream versions.
Philipp
At some point we'll want to update to get better support for newer standards. The LLVM preprocessor might be an alternative. There also is Wave in boost, but it apparently supports C99 only (i.e. no C89, C11 or C2X).
Philipp
P.S.: The LLVM preprocessor infrastructure has a reputation for being easy to use, but it depends on most of the rest of LLVM. So libcpp from GCC 10 or 11 looks like out best choice here.
Last edit: Philipp Klaus Krause 2021-04-07
This should also help us move towards C23 #embed: http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2898.htm
The preprocessor has been updated to cpp from gcc 12.1.0. [r13690].
Related
Commit: [r13690]