comp.lang.ada
 help / color / mirror / Atom feed
* [Q] pragma Warnings
@ 2007-11-28 18:53 Georg Bauhaus
  2007-11-28 19:56 ` Robert A Duff
  2007-11-29 22:37 ` Stephen Leake
  0 siblings, 2 replies; 4+ messages in thread
From: Georg Bauhaus @ 2007-11-28 18:53 UTC (permalink / raw)


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?)





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-11-29 22:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-11-28 18:53 [Q] pragma Warnings Georg Bauhaus
2007-11-28 19:56 ` Robert A Duff
2007-11-28 21:24   ` Georg Bauhaus
2007-11-29 22:37 ` Stephen Leake

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox