我想将行号作为字符串。如果我编译
#define STR(x) #x
#define AT __FILE__ ":" STR(__LINE__)
AT
带有gcc -E -cpp test.f90
。我得到:
# 1 "test.f90"
# 1 "<built-in>"
# 1 "<command-line>"
# 1 "test.f90"
"test.f90" ":" #4
我想得到:
# 1 "test.f90"
# 1 "<built-in>"
# 1 "<command-line>"
# 1 "test.f90"
"test.f90" ":" "4"
我在做什么错?
我不能使用整数文字,因为我们有一个现有的stop_all
例程,只接受字符串。