Ada Programming/Pragmas/Suppress

< Ada Programming < Pragmas
Computing » Computer Science » Computer Programming » Ada Programming

Summary

The pragma Suppress suppresses compiler-generated run-time checks. If a run-time check is disabled, an exception may be suppressed and undefined behavior could result. pragma Suppress is used at the programmer's risk.

Checks that may be suppressed are:

Example

My_Array : Array ( 1 .. 100 ) of Integer;
pragma Suppress( Index_Check );
...
Some_Variable := My_Array( 1000 ); -- Erroneous execution, here we come!

See also

Wikibook

Ada Reference Manual

Ada 2005 Reference Manual

Ada Quality and Style Guide

This article is issued from Wikibooks. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.