Skip to content

Commit 18bba73

Browse files
committed
doc [skip ci]
1 parent 2ae3e03 commit 18bba73

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

test/nullptr/main.f90

+3
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ function nullchar(b) bind(C)
1919

2020
type(c_ptr) :: ptr
2121

22+
!> Don't use c_associated to check uninitialized pointers, will give errors or unexpected behavior.
23+
!! if (c_associated(ptr))
24+
2225
if (.not. c_associated(nullchar(f))) error stop "nullptr should not be detected"
2326

2427
ptr = nullchar(t)

0 commit comments

Comments
 (0)