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: 103376,6ea75cb98c3c832d,start X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!news.glorb.com!solnet.ch!solnet.ch!newsfeed01.sul.t-online.de!t-online.de!newsfeed.arcor.de!newsspool2.arcor-online.net!news.arcor.de.POSTED!not-for-mail Newsgroups: comp.lang.ada Subject: [Q] pragma Warnings From: Georg Bauhaus Content-Type: text/plain Content-Transfer-Encoding: 7bit Message-ID: <1196276028.10481.19.camel@kartoffel> Mime-Version: 1.0 X-Mailer: Evolution 2.10.1 Date: Wed, 28 Nov 2007 19:53:49 +0100 Organization: Arcor NNTP-Posting-Date: 28 Nov 2007 19:53:41 CET NNTP-Posting-Host: e2447203.newsspool4.arcor-online.net X-Trace: DXC=M5nmOL>_DZC^B]`=U:WelB4IUKBgncWogJRjjD=kbmW`a1fGGC`2T@AUZfCKfejo4n\QekN X-Complaints-To: usenet-abuse@arcor.de Xref: g2news1.google.com comp.lang.ada:18662 Date: 2007-11-28T19:53:41+01:00 List-Id: In http://www.adacore.com/2007/11/19/ada-gem-18/ Bob Duff explains how to use GNAT's pragma Warnings. The effect is that GNAT users can control individual warnings by placing suitably crafted pragmas in source code, next to the lines that trigger the warning. Another effect is that some Ada programs are used with two or more targets and are translated using two or more different compilers. In this case, the non-GNAT compiler might complain about a non-supported pragma Warnings. Placing the pragmas in the source will then defeat the pragma's purpose because the compiler will issue a warning about an unknown Warnings pragma. (Hopefully, the other compiler will not report an error message, as is predictably the case with link library pragmas.) Is there an alternative to placing compiler specific pragma Warnings in portable (pragma-wise) Ada programs? (E.g., using the pragma as a configuration pragma, in a connected region of source code but not right in it? Using a smart IDE's filtering capabilities?)