This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC 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]

[Bug fortran/33268] read ('(f3.3)'), a rejected due to the extra (...)



------- Comment #2 from burnus at gcc dot gnu dot org  2007-08-31 20:16 -------
> The print case is rejected at run time.
My bad. I wanted to write:

 print('(a)'), 'Hello'

which is valid code and accepted. (Cf. PR33269 for detecting this.)

> read ('(f3.3)'), a ! Invalid, rejected at compile time, requires unit number.

I disagree - and also NAG f95 agrees with me; READ has two form:

R910 read-stmt is READ ( io-control-spec-list ) [ input-item-list ]
               or READ format [ , input-item-list ]

And I would argue that "read '(f3.3)', a" and "read ('(f3.3)'), a" are both of
the second type. As both are default-character-expressions, this should be
valid. As is my - fixed - PRINT case.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33268


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