comp.lang.ada
 help / color / mirror / Atom feed
From: xorquewasp@googlemail.com
Subject: Minor SPARK problem concerning 'redundant' with clauses.
Date: Wed, 10 Jun 2009 12:31:48 -0700 (PDT)
Date: 2009-06-10T12:31:48-07:00	[thread overview]
Message-ID: <d159ba39-a898-42fb-bb2b-a3b5142893d3@h28g2000yqd.googlegroups.com> (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.



             reply	other threads:[~2009-06-10 19:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-10 19:31 xorquewasp [this message]
2009-06-10 20:11 ` Minor SPARK problem concerning 'redundant' with clauses sjw
2009-06-10 20:55 ` britt.snodgrass
2009-06-11  8:45   ` xorque
2009-06-11  8:52   ` Robin Messer
replies disabled

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