-
Notifications
You must be signed in to change notification settings - Fork 12.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[flang] Incorrect preprocesor output #117297
Comments
@llvm/issue-subscribers-flang-frontend Author: None (shivaramaarao)
for the following program:
#define NOCOMMENT
NOCOMMENT CALL myfunc( 'hello ' // &
NOCOMMENT 'world' //
NOCOMMENT 'again' )
The correct preprocessor output is flang is not able to scan this code and gives following error |
You're missing a line continuation marker at the end of the line containing |
A free form source line that begins with a macro should still be classified as a source line, and have its continuation lines work, even if the macro expands to an empty replacement. Fixes llvm#117297.
Thanks. Corrected the testcase. |
for the following program:
#define NOCOMMENT
NOCOMMENT CALL myfunc( 'hello ' // &
NOCOMMENT 'world' // &
NOCOMMENT 'again' )
The correct preprocessor output is
CALL myfunc( 'hello ' // &
'world' //
'again' )
flang is not able to scan this code and gives following error
flang -E -ffree-form x1.F
error: Could not scan x1.F
./x1.F:2:25: error: Unmatched '('
NOCOMMENT CALL myfunc( 'hello ' // &
^
./x1.F:4:22: error: Unmatched ')'
NOCOMMENT 'again' )
^
The text was updated successfully, but these errors were encountered: