simplecpp icon indicating copy to clipboard operation
simplecpp copied to clipboard

Support prefix-less line preprocessor directive without file

Open firewave opened this issue 4 months ago • 0 comments

The GNU compilers also support a line preprocessor directive with just a number without a file specified.

# 3
__LINE__ __FILE__

gcc -E output:

# 0 "a.cpp"
# 0 "<built-in>"
# 0 "<command-line>"
# 1 "/usr/include/stdc-predef.h" 1 3 4
# 0 "<command-line>" 2
# 1 "a.cpp"
# 3 "a.cpp"
3 "a.cpp"

actual:


2 "a.cpp"

firewave avatar Aug 23 '25 12:08 firewave