- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
I looked at the Fortran 2003 standard handbook and could not find anywhere that disallow the use of a TARGET attribute inside a TYPE declaration, for example something like this
module junk
type :: abc
integer, target :: i
integer, pointer :: j
end type abc
end module junk
when I compile it using ifort, I would get
error #6516 : This attribute specification is not valid for a component definition statement. [TARGET]
and it points to the target attribute as the problem. I can see why things would be very confusing if this is allowed
but I cannot find where the standard disallows it though.
Anybody has any idea ?
Thanks.
링크가 복사됨
2 응답
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
Look at section 4.5.3 of the standard, page 50, where it describes a component of a derived type. The only attributes permitted for a data component are:
- POINTER
- DIMENSION
- ALLOCATABLE
- PUBLIC
- PRIVATE