- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is there some way of triggering the Intel compiler to produce a warning that certain statement lines cannot be executed. Something like this:
<do something>
9000 GOTO 1000
9020 PRINT *,'This statement will never be executed'
The Lahey compiler produces a message like this:
Line 990, file test.for
9020 PRINT *,'This statement will never be executed'
|
WARNING -- Statement label (9020) not referenced, statements not executed.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The Intel compiler does not have this - at least not in an easy-to-get-at form. (The Digital/Compaq compiler did.)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks. :-(
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It would be handy if dead code elimination was included in the reports.
Jim Dempsey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
And if there were an option to not remove dead code.... should one want to keep the code around for debugging (e.g. via Set Next Statement).
Jim Dempsey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The optimization reports do have dead code elimination messages, but it's not a simple compiler diagnostic. The compiler doesn't remove dead code if you're not optimizing.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The Intel compiler should notify these cases as other compilers do and it is difficult to understand why it does not provide warnings.
Along these lines, some time ago, I pointed out that IVF compiler does not provide any warning about subroutine variables used without any previously assigned value, while the Lahey compiler does. This can save quite a lot time to developers.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page