PreForM icon indicating copy to clipboard operation
PreForM copied to clipboard

Failure processing conditional in cpp-directives test

Open nshaffer opened this issue 7 years ago • 1 comments

I am using the current github version (v1.1.3) and have downloaded the exact raw of cpp-directives.F90. Attempting to pre-process it, PreForM.py seems to chokes on line 19

#if defined FIRST || defined SECOND

Full output below:

nshaffer@nshaffer-VirtualBox:~/Documents/PreForM_test$ PreForM.py cpp-directives.F90
program cpp_directives
implicit none
real:: x,y,z

print*,'Ok, "define" and "ifdef-else" work!'
print*,'Ok, "undef" and "ifdef-else" work!'

Error: conditional expression not correctly evaluated!
Original expression: defined FIRST || defined SECOND
Processed expression:  False  or   True
Defined macros
__FILE__: cpp-directives.F90
__LINE__: 19
__DATE__: Oct 30 2017
SECOND: 
__TIME__: 21:58:29
Undefined macros
FIRST

My best guess is that the expression is not getting processed recursively to True.

nshaffer avatar Oct 31 '17 03:10 nshaffer

Hi @nshaffer

thank you for reporting, I am now very busy, but ASAP I'll try to dig it deeper.

szaghi avatar Oct 31 '17 14:10 szaghi