comp.lang.ada
 help / color / mirror / Atom feed
* GNAT equivalent to gcc's #warning directive?
@ 2016-07-03  1:01 Warren
  2016-07-03  6:05 ` Niklas Holsti
  0 siblings, 1 reply; 3+ messages in thread
From: Warren @ 2016-07-03  1:01 UTC (permalink / raw)


I vaguely recall there was a gnat pragma to cause the compiler to spit out a user defined message. In C++ I often insert a cpp #warning when I need to go back and revisit some code. That way it nags me every time I build the project, until it gets addressed.

I'm looking for something similar in gnat. I thought it was pragma Warnings(), but that appears to be for known compiler warnings.

Warren

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

* Re: GNAT equivalent to gcc's #warning directive?
  2016-07-03  1:01 GNAT equivalent to gcc's #warning directive? Warren
@ 2016-07-03  6:05 ` Niklas Holsti
  2016-07-04  0:55   ` Warren
  0 siblings, 1 reply; 3+ messages in thread
From: Niklas Holsti @ 2016-07-03  6:05 UTC (permalink / raw)


On 16-07-03 04:01 , Warren wrote:
> I vaguely recall there was a gnat pragma to cause the compiler to
> spit out a user defined message. In C++ I often insert a cpp #warning
> when I need to go back and revisit some code. That way it nags me
> every time I build the project, until it gets addressed.
>
> I'm looking for something similar in gnat. I thought it was pragma
> Warnings(), but that appears to be for known compiler warnings.

Compile_Time_Warning:

http://docs.adacore.com/gnat_rm-docs/html/gnat_rm/gnat_rm/implementation_defined_pragmas.html#pragma-compile-time-warning


-- 
Niklas Holsti
Tidorum Ltd
niklas holsti tidorum fi
       .      @       .

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

* Re: GNAT equivalent to gcc's #warning directive?
  2016-07-03  6:05 ` Niklas Holsti
@ 2016-07-04  0:55   ` Warren
  0 siblings, 0 replies; 3+ messages in thread
From: Warren @ 2016-07-04  0:55 UTC (permalink / raw)


On Sunday, 3 July 2016 02:05:39 UTC-4, Niklas Holsti  wrote:
..
> Compile_Time_Warning:
> 
> http://docs.adacore.com/gnat_rm-docs/html/gnat_rm/gnat_rm/implementation_defined_pragmas.html#pragma-compile-time-warning

Perfect, thanks.

Warren


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

end of thread, other threads:[~2016-07-04  0:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-03  1:01 GNAT equivalent to gcc's #warning directive? Warren
2016-07-03  6:05 ` Niklas Holsti
2016-07-04  0:55   ` Warren

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