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=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,bf20d1395cdb6de5 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!news2.google.com!postnews.google.com!k35g2000yqb.googlegroups.com!not-for-mail From: Ludovic Brenta Newsgroups: comp.lang.ada Subject: Re: No "pragma Deprecated (NAME)"? Date: Thu, 21 Jan 2010 01:30:33 -0800 (PST) Organization: http://groups.google.com Message-ID: <17ac14ee-617f-4370-bb9e-ad0fbb540d00@k35g2000yqb.googlegroups.com> References: NNTP-Posting-Host: 153.98.68.197 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1264066233 31038 127.0.0.1 (21 Jan 2010 09:30:33 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 21 Jan 2010 09:30:33 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: k35g2000yqb.googlegroups.com; posting-host=153.98.68.197; posting-account=pcLQNgkAAAD9TrXkhkIgiY6-MDtJjIlC User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.7) Gecko/20091221 Firefox/3.5.7,gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:8809 Date: 2010-01-21T01:30:33-08:00 List-Id: Michael R wrote on comp.lang.ada: > On Jan 20, 7:57=A0pm, "Jeffrey R. Carter" >>> =A0 =A0function Name (T : My_Type) return String; >>> =A0 =A0function To_String (T : My_Type) return String >>> =A0 =A0 =A0 renames Name; >>> =A0 =A0pragma Deprecated (To_String); > >> "Deprecated" is not a language-defined pragma, but unrecognized pragmas = should >> be ignored (ARM 2.8). I see nothing wrong with your function renaming. W= hat >> error message did you get? > > Yes, it generated a warning as un-recognized but I was hoping for the > functionality, i.e., the implementation of this pragma where usage > of the old name generates deprecated warning when used. GNAT has an implementation-defined "pragma Obsolescent", see http://gcc.gnu.org/onlinedocs/gnat_rm/Pragma-Obsolescent.html -- Ludovic Brenta.