comp.lang.ada
 help / color / mirror / Atom feed
* Minor SPARK problem concerning 'redundant' with clauses.
@ 2009-06-10 19:31 xorquewasp
  2009-06-10 20:11 ` sjw
  2009-06-10 20:55 ` britt.snodgrass
  0 siblings, 2 replies; 5+ messages in thread
From: xorquewasp @ 2009-06-10 19:31 UTC (permalink / raw)


I have a package P1 that uses the value of a constant defined in P2.

SPARK requires me to --# inherit P2 and the only place the annotation
can appear is in the spec of P1. The Ada compiler, however, sees that
the constant is only referenced in the body and complains loudly that
the 'with' clause is redundant and might be moved into the body of P2.

Is there a sensible solution to stop the two systems treading on each
other like this? In most cases, I can hack around the problem with a
spurious 'use type' clause (as much as I dislike it).

I tried to use pragma Warnings (Off) to wrap the "redundant" with
clauses, but of course SPARK immediately rejected it:

***        Syntax Error      : No complete PRAGMA_REP can be followed
by
           reserved word "WITH" here.



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

end of thread, other threads:[~2009-06-11  8:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-10 19:31 Minor SPARK problem concerning 'redundant' with clauses xorquewasp
2009-06-10 20:11 ` sjw
2009-06-10 20:55 ` britt.snodgrass
2009-06-11  8:45   ` xorque
2009-06-11  8:52   ` Robin Messer

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