She*_*284 6 fortran fortran90 intel-fortran
我不熟悉导致以下警告的原因:
warning #5117: Bad # preprocessor line
#include "rtt_alloc_rad.interface"
Run Code Online (Sandbox Code Playgroud)
我已经看过一些明显的问题,比如#include
左边是红色的.我想知道在哪里寻找可能的原因的一些提示.
我正在使用英特尔编译器:ifort版本15.0.1
该代码具有与外部库相关联的大型气候模型.很难知道要发布什么,但警告来自以下代码段:
MODULE rtt_interface
use rtt_types, only : rtt_options, rtt_coefs, profile_Type, &
transmission_Type, radiance_Type,rtt_coef_scatt_ir,rtt_optpar_ir, &
rtt_chanprof, rtt_emissivity, rtt_reflectance
use rtt_const, only : errorstatus_success, errorstatus_fatal, &
platform_name,inst_name
use rtt_unix_env, only : rtt_exit
use cosp_kinds, only : wp,wi,wl
IMPLICIT NONE
real(wp), parameter :: tmin_baran = 193.1571_wp
#include "rtt_alloc_rad.interface"
#include "rtt_alloc_transmission.interface"
#include "rtt_alloc_prof.interface"
#include "rtt_dealloc_coefs.interface"
#include "rtt_direct.interface"
#include "rtt_print_opts.interface"
! snip...
END MODULE rtt_interface
Run Code Online (Sandbox Code Playgroud)
我用标志编译: f90flags=-g -fp-model precise -traceback -r8 -O0
fra*_*lus 10
消息
警告#5117:错误#预处理器行
可能有点误导.它表明代码已经通过预处理器传递,并且它是不满意的预处理器.情况并非总是如此:当源文件中出现预处理程序指令但未调用预处理程序时,ifort也会生成此警告消息.
要确保运行预处理器,您有几个选择:
-fpp
(或-cpp
)添加到编译命令;.F90
(注意大写).