- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ifort produces a standard conformance warning for code like:
ifort12-warn-on-directive.f90(7): warning #6477: Fortran 2003 does not allow this statement or directive.
!DIR$ IVDEP
------^
(The intent of the compiler-dependent directives is to aid e.g. optimization or vectorization).
Note that the compiler directives in the source code have the
form of a Fortran comment and should IMHO be treated as such.
It would be nice if the warning would disappear.
Harald
[bash]subroutine bogus_warning (a, n) implicit none integer :: n real :: a(n) integer :: j !DIR$ IVDEP !CDIR NODEP DO j = 1, n a(j) = 0.0 END DO end subroutine bogus_warning [/bash]% ifort ifort12-warn-on-directive.f90 -c -stand
ifort12-warn-on-directive.f90(7): warning #6477: Fortran 2003 does not allow this statement or directive.
!DIR$ IVDEP
------^
(The intent of the compiler-dependent directives is to aid e.g. optimization or vectorization).
Note that the compiler directives in the source code have the
form of a Fortran comment and should IMHO be treated as such.
It would be nice if the warning would disappear.
Harald
Link Copied
6 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
We had an extensive discussion about this in the past, and decided that directives are "funny-looking statements" and not comments, and that the warnings were appropriate.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Steve,
Considering that compiler directives are implementation dependent could IVF consider adding a NOWARN attribute
!DEC$ (something) NOWARN
(something else causing warning)
statement
This would satisfy both sides of the argument for/against the warning
Jim Dempsey
Considering that compiler directives are implementation dependent could IVF consider adding a NOWARN attribute
!DEC$ (something) NOWARN
(something else causing warning)
statement
This would satisfy both sides of the argument for/against the warning
Jim Dempsey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Well, no, that would mean thast the NOWARN directive would need a warning!
Perhaps what is needed is a "don't give standards warnings about directives" compiler option. VAX Fortran used to have several sub-qualifiers for standards warning allowing you to exclude things such as source form (tab formatting), etc. Or, simpler, separate out warnings for directives to their own message number and then you can use -diag-disable to suppress it. I will suggest this to the team.
Perhaps what is needed is a "don't give standards warnings about directives" compiler option. VAX Fortran used to have several sub-qualifiers for standards warning allowing you to exclude things such as source form (tab formatting), etc. Or, simpler, separate out warnings for directives to their own message number and then you can use -diag-disable to suppress it. I will suggest this to the team.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
An option to disable the particular warning would be great.
Thanks,
Harald
Thanks,
Harald
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try adding the following switch to your command line:
-diag-disable 6477
-- Lorri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am now using
-diag-disable 6477,7025
to suppress the directive-related warnings.
Thanks,
Harald
-diag-disable 6477,7025
to suppress the directive-related warnings.
Thanks,
Harald

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page