From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,dfadb64ce9f4daa5 X-Google-Attributes: gid103376,public From: bobduff@world.std.com (Robert A Duff) Subject: Re: Which compiler is correct?? Date: 1996/09/11 Message-ID: #1/1 X-Deja-AN: 179923533 references: <514uuu$d8i@uuneo.neosoft.com> organization: The World Public Access UNIX, Brookline, MA newsgroups: comp.lang.ada Date: 1996-09-11T00:00:00+00:00 List-Id: In article <514uuu$d8i@uuneo.neosoft.com>, >I can see maybe 4 choices: 1) GNAT is wrong, 2) ObjectAda is >wrong, 3) the code is wrong, 4) I need to set some compile >switches on one compiler or the other. Looks like 1 and 3, to me. Please send a bug report to ACT -- apparently GNAT doesn't understand that choice parameters are constant. >On a PC with GNAT 304a touted as being compiled for Windows and >GNAT 301 on a NeXT/M68040 I get no errors. > >With Academic ObjectAda v7.0.171 I get 3 occurrences of the same error >along with line and column numbers. > > LRM:6.4.15(5) If the mode is IN OUT or OUT, the actual > shall be a name that denotes a variable. It would have been easier if you had told me *which* line and column numbers! ;-) > exception > when error_in_square_function: > constraint_error => ada.exceptions.save_occurrence > (error_in_square_function,error_list(1)); You've got the parameters backwards. Look up the spec of Save_Occurrence. Note that error_in_square_function is constant (by RM-1.2(9)), so you can't pass it to an in-out param. > return 0; Here, "raise;" would be more appropriate, at least in a real program. - Bob