- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This demo uses fixed source form and a comment indicator to the right of the format statement. The comment extends past column 72.
[bash]When the compiler option -warn truncated_source is used, Intel fortran generates a warning for this line:
integer ios, state, id, div, name, xlat, xlong, ib, ie, elev read (12, 8, iostat=ios) state,id,div,name,xlat,xlong,ib,ie,elev 8 format(i2,i4,i2,i24,2i8,3i6,2x,a8) ! extended for basin on output end [/bash]
[bash]mac56:~/div/basins 155> ifort -warn truncated_source fixed-format1.f fixed-format1.f(7): warning #5194: Source line truncated. 8 format(i2,i4,i2,i24,2i8,3i6,2x,a8) ! extended for basin on output ------------------------------------------------------------------------^ mac56:~/div/basins 157> ifort -V Intel Fortran Intel 64 Compiler Professional for applications running on Intel 64, Version 11.1 Build 20100806 Package ID: m_cprof_p_11.1.089 [/bash]In my opinion this is an invalid warning because the comment field is clearly initiated before column 73, and comment fields should be exempt from truncation check. IMO the syntax of this example is standard compliant for fixed format. Also from a user perspective, this warning is a nuisance when trying to add comments to fixed format legacy code.
Obviously this is not a critical issue. I would appreciate Intel's opinion and a change in -warn truncated_source if you agree. Thanks for your consideration.
--Dave
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This is a long-running argument. We decided to keep it the way it is, partly because doing it otherwise would require moving the check to later in the compilation process and opening the potential for error. If you are sticking to fixed-form source, keep it all to within 72 columns, even the comments.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hmm. Thanks for the perspective, Steve. Was this discussed in any public forum where I can read the archives?
Meanwhile, I will experiment with -extended-source 132, or constrain my commenting style.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The discussion I know of was internal to the development team. But whichever way we pick, someone will be unhappy. I recommend that you "constrain your commenting style" to conform to the standard, if you must use fixed-form. I have a distaste for coding conventions that require compiler options to make the source valid.
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