小编You*_* Hu的帖子

Fortran 分配(重新)分配和 gfortran 警告

一个简单的代码:

\n\n
program main\ninteger, allocatable :: A(:,:)\ninteger              :: B(3,4)\nB=1\nA = B  !A will get allocated, with the same shape and bounds as B\nend program main\n
Run Code Online (Sandbox Code Playgroud)\n\n

编译上面的代码:gfortran-8 -std=f2008 -fcheck=all -Wall -Wextra -fbounds-check -fimplicit-none array.f90

\n\n

我收到以下警告:

\n\n

Warning: \xe2\x80\x98a.offset\xe2\x80\x99 may be used uninitialized in this function\nWarning: \xe2\x80\x98a.dim[0].lbound\xe2\x80\x99 may be used uninitialized in this function \nWarning: \xe2\x80\x98a.dim[0].ubound\xe2\x80\x99 may be used uninitialized in this function [-Wmaybe-uninitialized]

\n\n

有人知道我为什么收到这些警告吗?

\n

fortran gfortran compiler-warnings gcc-warning allocatable-array

5
推荐指数
1
解决办法
842
查看次数

Emacs 搜索带有下划线的单词不被视为单词边界

使用正则表达式\bfoo\b搜索单词时foo,结果包括诸如foo_a和 之类的单词a_foo。如何从结果中排除这些词?即,如何要求 emacs 不将下划线视为单词边界。

regex emacs search word-boundary

1
推荐指数
1
解决办法
364
查看次数