- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
with ivf compiling with the Property Page Fortran Diagnostics
Warn For Non-standard Fortran
set to
Fortran 90
I get a warning for every compiler directive eg
!DEC$ENDIF
!DEC$ENDIF
produces
SGRUN.FOR(14) : Warning: This directive is not standard F90.
SGRUN.FOR(14) : Warning: This directive is not standard F90.
I have a thousand or so.
How can I supress them and still get the other non f90 warnings?
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can't. We're discussing a possible future feature that would give you that control. But, think about it - your code isn't standard F90 if it has directives, which are just statements spelled in a funny way.
You could consider using the fpp preprocessor and I think you would not get standards warnings for that. You'd have to change the !DEC$ IF to #if, etc.
You could consider using the fpp preprocessor and I think you would not get standards warnings for that. You'd have to change the !DEC$ IF to #if, etc.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Why would IVF--or any Fortran compiler--complain about statements beginning with ! followed by characters? Isn't that a valid Fortran 90 comment?
Mike D.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It is to a compiler that doesn't recognize the directive, yes. That's the motivation for the directive design.
But for a compiler that DOES recognize them, they are statements. We had a long and drawn-out debate about this a few years ago. I originally took the view that they were comments, but when it was pointed out to me that directives change the semantics of a program, I changed my mind.
You ask for standards checking to make sure you aren't using any constructs that may be non-portable. Directives fall into this category. Your program may require directives to work the way you want, so you should be warned about them.
But for a compiler that DOES recognize them, they are statements. We had a long and drawn-out debate about this a few years ago. I originally took the view that they were comments, but when it was pointed out to me that directives change the semantics of a program, I changed my mind.
You ask for standards checking to make sure you aren't using any constructs that may be non-portable. Directives fall into this category. Your program may require directives to work the way you want, so you should be warned about them.

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