This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Possible bug of the Fortran compiler system.


On 2010-05-05 00:40, mrkmhrsh@yahoo.co.jp wrote:
------------------- cut here -----------------
PROGRAM MAIN
REAL A
   !----
   ! IN THE FOLLOWING FOUR LINES, THE COMMAS APPEARED
   ! JUST AFTER THE RIGHT PARENTHESES ARE IN ERROR, I THINK.
   ! HOWEVER, SOME COMPILERS DO NOT REFUSE.
   READ(*,*),
   READ(*,*),A
   WRITE(*,*),
   WRITE(*,*),A
   !----
END PROGRAM MAIN
-------------------- cut here --------------

The program is indeed invalid by the standard, but it's a common extension. If you want to get all extensions flagged by the compiler, be sure to use the -std=f95 option (-std=f2003, -std=f2008, ...). If, with the option, this code is not flagged, then it's a bug.


Cheers,
- Tobi


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]