[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gnubol: subsets



Here is what I base my claims on:

From the standard page I-8, section 1.5.2.5.2

"A confirming implementation must provide a warning machanism, which optionally
may be invoked by the user at compile time to indicate, if appropriate, that a
program contains nonstandard extensions that are included in the implementation."

"The warning machanism is required to flag only extenstions that are
syntactically distinguishable" (added in the X3.25b-1995 correction amendment).

COBOL clarification CIB-25/A-09 "Nested if statements and scope terminators next
sentence then end-if" specifically states that next sentence followed by end-if
is not allowed. I don't have the hardcopy with me. The clarifications are not
part of the standard but they are issued by the standard committee in their
capacity as the standard committee.

Why make a fuss over this? I personally find it very annoying to find I have been
lured into using extenstions without realising it. It makes writing portable code
much harder.

Tim Josling

Michael McKernan wrote:

> >>>>> "Tim" == Tim E Josling <TIMJOSLING@prodigy.net>
> >>>>> wrote the following on Thu, 18 Nov 1999 14:48:15 +1000
>
>   Tim> The standard specifically requires us to flag extensions upon
>   Tim> request. I think we should try and do this. Someone would have
>   Tim> to write code to find these and warn the user. As an option
>   Tim> you can turn on/off. I will research further how you can pick
>   Tim> it up.
>
>   Tim> Tim Josling
>
>   Tim> Michael McKernan wrote:
>
>   >> I didn't even notice that grammar problem; I just tried to get
>   >> the original grammar to go through an LL/1 parser... Right now,
>   >> I think the best thing to do is accept it.
>
> Since a discussion about similar matters has been occupying quite a
> lot of the list lately, I'd like to address the issue of extensions.
>
> It is my belief, after a careful reading of the relevant parts of the
> standard, that no extension is involved in accepting NEXT SENTENCE in
> a delimited IF nor in accepting undelimited conditional parts within
> conditional parts.  There is no trace of new language anywhere.
>
> The question really should be whether the standard makes any specific
> requirement of the compiler when it encounters an infraction.  So far
> as I am able to tell, a conforming compiler need not even be able to
> emit a single diagnostic, so long as it is capable of compiling
> programs that are correct according to the standard.  Not a very
> desirable compiler, granted, but conforming nonetheless.
>
> There are people on his list who know the standard better than I, so
> I put the question.  Is there anything in the standard that indicates
> an expected behavior for a program in error?  Is there any reason to
> conclude that overlooking the infraction and successfully compiling
> the program is in any proscribed by the standard?
>
> Best regards,
>
> Mike
>
> --
> This message was sent through the gnu-cobol mailing list.  To remove yourself
> from this mailing list, send a message to majordomo@lusars.net with the
> words "unsubscribe gnu-cobol" in the message body.  For more information on
> the GNU COBOL project, send mail to gnu-cobol-owner@lusars.net.


--
This message was sent through the gnu-cobol mailing list.  To remove yourself
from this mailing list, send a message to majordomo@lusars.net with the
words "unsubscribe gnu-cobol" in the message body.  For more information on
the GNU COBOL project, send mail to gnu-cobol-owner@lusars.net.