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!news.eternal-september.org!mx05.eternal-september.org!feeder.eternal-september.org!nuzba.szn.dk!news.jacob-sparre.dk!loke.jacob-sparre.dk!pnx.dk!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Elaboration order handling (Was: Bug in 'gnatmake') Date: Wed, 19 Jun 2013 17:26:20 -0500 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: References: <7f33982d-3bcf-452e-a3b3-3a0a28505ff1@x20g2000vbe.googlegroups.com> <87r4g0g9c0.fsf@adaheads.sparre-andersen.dk> <87ip1bg4z2.fsf_-_@adaheads.sparre-andersen.dk> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: loke.gir.dk 1371680780 529 69.95.181.76 (19 Jun 2013 22:26:20 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Wed, 19 Jun 2013 22:26:20 +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:15850 Date: 2013-06-19T17:26:20-05:00 List-Id: "Robert A Duff" wrote in message news:wccip1acmt5.fsf@shell01.TheWorld.com... ... > I don't see what the big deal is. Any legal Ada identifier can be > represented as a Wide_Wide_String, and every Ada 2012 implementation > supports the "<" operator on those. So one trivial solution is to > simply sort based on that "<", in cases where the current rules about > 'with' clauses and pragmas leave the order undefined. That doesn't work because Ada identifiers are case-insensitive, while "<" is case-sensitive. You could get orders that depend on the case of the identifiers, and in fact you could get children coming before parents. A direct conversion to some specific case doesn't work portably in Unicode (because it depends on what version Unicode you are using, while the case-insensitive compare is guarenteed to work the same in all versions of Unicode). The net effect is that ordering is not very reliable in case-insensitive Unicode identifiers, like Ada's. Cool, huh? Randy.