You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have the following Haskell file that contains a CPP macro.
#define FOO( x, y ) x ++ y
foo =FOO("a",
"b"++"c")
bar =1
When I call cpphs on this file, I get the following result.
#line 1 "Test.hs"
foo ="a"++"b"++"c"
bar =1
The line directive states that the line that is following the directive is line 1 of Test.hs. Therefore, foo is still positioned at line 3 while bar is now positioned at line 7, while it has been in line 8 in the original file.
Does somebody know whether this behavior is intentional? I would have expected that cpphs inserts a line directive when a macro is expanded in order to fix the positions of the subsequent definitions. For example, clang and gcc yield the following output.
That is, there is a line marker that assigns line 8 to bar.
Does somebody know whether this is some kind of missing feature in cpphs or if there is some other reason for the behavior? Did I miss some other option to cpphs that would fix this problem?
The text was updated successfully, but these errors were encountered:
I have the following Haskell file that contains a CPP macro.
When I call
cpphs
on this file, I get the following result.The line directive states that the line that is following the directive is line
1
ofTest.hs
. Therefore,foo
is still positioned at line3
whilebar
is now positioned at line7
, while it has been in line8
in the original file.Does somebody know whether this behavior is intentional? I would have expected that
cpphs
inserts a line directive when a macro is expanded in order to fix the positions of the subsequent definitions. For example,clang
andgcc
yield the following output.That is, there is a line marker that assigns line
8
tobar
.Does somebody know whether this is some kind of missing feature in
cpphs
or if there is some other reason for the behavior? Did I miss some other option tocpphs
that would fix this problem?The text was updated successfully, but these errors were encountered: