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: [gfortran] Fix RETURN matcher was: Re: bug fc110


On Apr 15, 2005, at 3:54 PM, Tobias Schlüter wrote:

Yes, that's the place that I had quoted :-) in reply to which Walt claimed
that the blank between RETURN (keyword) and 1 (constant) is not required,
because it's not a constraint. But maybe I misunderstood him?

Yes, I think you did. At least the above is sure confused.


There are *LOTS* of things that are required even though they are not constraints. Pretty much the whole standard is a bunch of requirements, and most of it is not constraints. In this regard, it is absolutely critical to distinguish between requirements on the compiler and requirements on the programmer - the two are fairly often exactly the opposite in that requirements on the programmer correspond to freedoms of the compiler.

The blank is required. Period. That's what the cited text says. But remember that requirements of the standard are requirements on programmers - that's actually quite important. The requirements on the compiler are quite different. The compiler is, of course, required to accept the blank. That's because a compiler is required to accept all standard-conforming syntax.

The business about constraints comes in because constraints are one of the things that compilers are required to be able to diagnose violations of. This is not a constraint and, therefore, the compiler is not required to diagnose the absence of the blank. Note the difference here: the programmer is required to put the blank there, but the compiler is not required to diagnose its omission.

--
Richard Maine                |  Good judgment comes from experience;
Richard.Maine@nasa.gov       |  experience comes from bad judgment.
                            |        -- Mark Twain


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