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.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: buffer2.nntp.dca1.giganews.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news.glorb.com!feeder.erje.net!1.eu.feeder.erje.net!news2.arglkargh.de!newsfeed.fsmpi.rwth-aachen.de!newsfeed.straub-nv.de!reality.xs3.de!news.jacob-sparre.dk!loke.jacob-sparre.dk!pnx.dk!.POSTED!not-for-mail From: Jacob Sparre Andersen Newsgroups: comp.lang.ada Subject: Re: Is this a bug in my code or the compiler? Date: Sat, 13 Jun 2015 15:33:07 +0200 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: <87si9vohrg.fsf@adaheads.sparre-andersen.dk> References: <4f4cd4b1-0a6d-441b-a4f7-98add70e4e1e@googlegroups.com> NNTP-Posting-Host: 109.59.27.150.mobile.3.dk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: loke.gir.dk 1434202388 23809 109.59.27.150 (13 Jun 2015 13:33:08 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Sat, 13 Jun 2015 13:33:08 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux) Cancel-Lock: sha1:jFG4+Vp+UdfH1zbsQLF4ZEXZCDM= Xref: number.nntp.giganews.com comp.lang.ada:193610 Date: 2015-06-13T15:33:07+02:00 List-Id: David Botton wrote: > function Token_Start (Source : in out Awesome.Source.Source_Type'Class) > return Character; > function Token_End (Source : in out Awesome.Source.Source_Type'Class) > return String; > return Token_Start (Source) & Token_End (Source); Doesn't your compiler warn you about modifying Source in two places (roughly) at the same time? GNAT 4.9 complains loudly about the roughly similar case: procedure P (A, B : in out T); P (C, C); But I can't get it to complain about a simplified variation of your case. Maybe there is an AdaControl rule to detect this kind of problem. But it is an obviously faulty expression, so it would make most sense if it was forbidden in the language. Greetings, Jacob -- "It is very easy to get ridiculously confused about the tenses of time travel, but most things can be resolved by a sufficiently large ego."