【发布时间】:2016-01-13 15:19:43
【问题描述】:
在 GCC 中禁用将特定警告视为错误的正确标志或标志顺序是什么?我想为-Wimplicit-interface 这样做。
>cat test.f90
call s
end
> gfortran -c -Werror -Wimplicit-interface -Wno-error=implicit-interface test.f90 -o test.o
test.f90:1.7:
call s
1
Warning: Procedure 's' called with an implicit interface at (1)
>ls test*
test.f90
没有生成test.o。
没有-Werror 它可以工作
> gfortran -c -Wimplicit-interface -Wno-error=implicit-interface test.f90 -o test.o
test.f90:1.7:
call s
1
Warning: Procedure 's' called with an implicit interface at (1)
> ls test*
test.f90 test.o
GCC 版本是gcc version 4.9.2 20141030 (Cray Inc.) (GCC)。
【问题讨论】:
-
这似乎与 gcc-5 的预期一样。
-
有趣,这可能是这个问题的答案。
标签: gcc compiler-errors fortran compiler-warnings gfortran