comp.lang.ada
 help / color / mirror / Atom feed
From: Robert A Duff <bobduff@shell01.TheWorld.com>
Subject: Re: gnade error
Date: Wed, 15 Nov 2006 09:28:26 -0500
Date: 2006-11-15T09:28:26-05:00	[thread overview]
Message-ID: <wccodr8eqd1.fsf@shell01.TheWorld.com> (raw)
In-Reply-To: t_t6h.145522$aJ.59366@attbi_s21

"Jeffrey R. Carter" <spam.not.jrcarter@acm.not.spam.org> writes:

> OK, a *legal* pragma should not ...

There are many pragmas that cause other parts of the program to be
illegal.  Pragma Restrictions, for example, has that as its main
purpose.  A pragma that goes the other direction (causes an otherwise
illegal program to be legal) is in rather poor taste, but there are some
cases of that, too -- rather obscure cases.

But you're right about pragma Inline -- a pragma Inline cannot affect
the legality of the program (so long as the pragma itself obeys the
rules, such as the names have to denote subprograms).

However, many compilers have switches that invoke nonstandard modes.
In GNAT, you can tell it to warn about pragmas Inline that are not
obeyed, and you can also tell it to treat warnings as errors (-gnatwe
switch).  In this nonstandard mode, a pragma Inline that does not inline
makes the program illegal.

- Bob



  reply	other threads:[~2006-11-15 14:28 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-14  8:08 gnade error Brian May
2006-11-14  9:20 ` Dmitry A. Kazakov
2006-11-14 13:42 ` Stephen Leake
2006-11-14 17:01   ` Jeffrey R. Carter
2006-11-14 17:52     ` Adam Beneschan
2006-11-15  1:23       ` Jeffrey R. Carter
2006-11-15 14:28         ` Robert A Duff [this message]
2006-11-14 23:52   ` Brian May
2006-11-15  0:07     ` Ludovic Brenta
replies disabled

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