Skip to content

Support prefix-less #line preprocessor directive without file #504

@firewave

Description

@firewave

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"

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions