simplecpp icon indicating copy to clipboard operation
simplecpp copied to clipboard

`#` in macro left in original location

Open firewave opened this issue 5 months ago • 1 comments

From testsuite/clang-preprocessor-tests/hash_space.c and uncovered by #490.

#define HASH #
HASH define foo bar

gcc -E output:

# 0 "testsuite/clang-preprocessor-tests/hash_space.c"
# 0 "<built-in>"
# 0 "<command-line>"
# 1 "/usr/include/stdc-predef.h" 1 3 4
# 0 "<command-line>" 2
# 1 "testsuite/clang-preprocessor-tests/hash_space.c"

 # define foo bar

actual:

1: #
2: define foo bar

firewave avatar Aug 12 '25 11:08 firewave

Looks like this is also the issue with testsuite/clang-preprocessor-tests/macro_not_define.c.

firewave avatar Aug 12 '25 11:08 firewave