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: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!gandalf.srv.welterde.de!news.jacob-sparre.dk!loke.jacob-sparre.dk!pnx.dk!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Is this a bug in my code or the compiler? Date: Sat, 13 Jun 2015 22:18:21 -0500 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: References: <4f4cd4b1-0a6d-441b-a4f7-98add70e4e1e@googlegroups.com> <87si9vohrg.fsf@adaheads.sparre-andersen.dk> NNTP-Posting-Host: rrsoftware.com X-Trace: loke.gir.dk 1434251902 24371 24.196.82.226 (14 Jun 2015 03:18:22 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Sun, 14 Jun 2015 03:18:22 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Xref: news.eternal-september.org comp.lang.ada:26315 Date: 2015-06-13T22:18:21-05:00 List-Id: "Jacob Sparre Andersen" wrote in message news:87si9vohrg.fsf@adaheads.sparre-andersen.dk... > 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? As I noted, this code is illegal in Ada. Forget the warning, and fix the compiler to detect the error! Randy.