arocc icon indicating copy to clipboard operation
arocc copied to clipboard

Add computed include support

Open ehaas opened this issue 3 years ago • 0 comments

The following is allowed by gcc/clang:

#define HEADER <stdarg.h>
#include HEADER

arocc currently gives:

./test.c:2:10: error: expected "FILENAME" or <FILENAME>
#include HEADER
         ^

https://gcc.gnu.org/onlinedocs/cpp/Computed-Includes.html

Relevant thing we're not doing:

If the first non-whitespace character after ‘#include’ is not ‘"’ or ‘<’, then the entire line is macro-expanded like running text would be.

ehaas avatar May 26 '22 07:05 ehaas