comp.lang.ada
 help / color / mirror / Atom feed
* How do I turn off this warning?
@ 2008-07-22 20:07 mockturtle
  2008-07-22 20:34 ` Robert A Duff
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: mockturtle @ 2008-07-22 20:07 UTC (permalink / raw)


Hi there,
I have the following almost-essential code

-------------------------------------------------
with System;

package V is
   type Unsigned_2 is mod 2**2;
   type Unsigned_5 is mod 2**2;

   type T1 is
      record
         Version : Unsigned_2;
         Inline  : Boolean;
         Command : Unsigned_5;
      end record;

   for T1'Bit_Order use System.High_Order_First;
   for T1 use
      record
         Version at 0 range 0..1;
         Inline  at 0 range 2..2;
         Command at 0 range 3..7;
      end record;
end V;
-------------------------------------------------

If I try to compile it with "gnatmake" I obtain the
following list of warnings

 v.ads:17:29: warning: reverse bit order in machine scalar of length 8
 v.ads:17:29: warning: little-endian range for component "Version" is
6 .. 7
 v.ads:18:29: warning: reverse bit order in machine scalar of length 8
 v.ads:18:29: warning: little-endian range for component "Inline" is
5 .. 5
 v.ads:19:29: warning: reverse bit order in machine scalar of length 8
 v.ads:19:29: warning: little-endian range for component "Command" is
0 .. 4

I understand that with

   for T1'Bit_Order use System.High_Order_First;

I am requesting the opposite convention of the "natural"
one of my architecture (Linux on Intel), but I am
aware of it and I need it to match the order in
the packets I want to process.  I am getting sick of
those warnings and I would like to say to the compiler
"Thank you for your help, but I know what I am doing,
so shut up."

I tried to look at the option list you get by calling "gnatmake" by
itself
and also "-gnatwA" (turn off all optional warning), but with no luck.
Any idea?



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

end of thread, other threads:[~2008-07-23 20:23 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-07-22 20:07 How do I turn off this warning? mockturtle
2008-07-22 20:34 ` Robert A Duff
2008-07-22 21:36 ` Simon Wright
2008-07-23 11:22 ` stefan-lucks
2008-07-23 20:23   ` Simon Wright

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