> and from looking at SET_TYPE_RM_VALUEs definition it doesn't
> touch TYPE_MAX_VALUE.  So TYPE_MAX_VALUE is as set from
> make_unsigned_type (8) which should set it to 255, not 1.
>
> So ... how can it be a no-op?

Look a few lines below. :-)  In gigi we manipulate both full-fledged Ada types 
with RM bounds and GCC types without RM bounds so it's more convenient to have 
a single accessor macro.

> Heh ;)  At least Fortran doesn't play games with TYPE_PRECISION ;)

Right, but TYPE_PRECISION isn't prescribed by the C ABI, is it?  More seriously 
I think that your suggestion is the way to go and I made the same when we were 
fiddling with boolean_type_node in free_lang_data:
  http://gcc.gnu.org/ml/gcc-patches/2009-10/msg00966.html

So fine with me, as long as all the languages play by the same rules.

-- 
Eric Botcazou

Reply via email to