rid
rid

Reputation: 63452

"requires body" warnings

I have something like the following:

package ID_Count_Hashed_Map is new Ada.Containers.Hashed_Maps
  (Key_Type        => ID,
   Element_Type    => Count,
   Hash            => Hash,
   Equivalent_Keys => "=");

If I try to compile with -gnatw.e, I get warnings like:

info: in instantiation at a-cohama.ads:73
info: "ID_Count_Hashed_Map" requires body ("Has_Element" requires completion)
info: in instantiation at a-cohama.ads:79
info: "ID_Count_Hashed_Map" requires body ("=" requires completion)
info: in instantiation at a-cohama.ads:90
info: "ID_Count_Hashed_Map" requires body ("Capacity" requires completion)
...

What do these warnings mean? Where can I find about them in the documentation? And, if they don't relate to my code, how do I turn them off while still keeping the rest of -gnatw.e?

Upvotes: 1

Views: 151

Answers (1)

Jacob Sparre Andersen
Jacob Sparre Andersen

Reputation: 6611

You can probably find the messages documented in the GNAT User's Guide

Quoting from the guide:

The use of this switch is not recommended for normal use.

The user's guide continues with an advice to use -gnatwa instead.

Upvotes: 1

Related Questions