Re: [RFA] print arrays with indexes

Daniel Jacobowitz
2005-10-02T22:42:24Z

On Mon, Sep 26, 2005 at 06:04:20PM -0700, Joel Brobecker wrote:
> BTW: I think you are using vim, IIRC. Do you have some magic settings
> that handles that handles the tabs for you. If I were able to have tabs
> automatically created after I create spaces, and also transformed into
> spaces when I backspace into them, as well as allowing me to go through
> them as if they were spaces, I wouldn't mind the tabs so much.

No, sorry; I use a bastard combination of emacs and joe for most of my
code editing. Can't help you with Vim.

> + if (TYPE_CODE (index) == TYPE_CODE_RANGE)
> + index = TYPE_TARGET_TYPE (index);
>
> which the function used to have. I couldn't understand why this
> was necessary, and a look at where the type was used showed that
> this was not necessary, as ada_print_scalar, the only eventual consumer
> of that type, knew how to handle range types. I would think the same is
> true of all other languages, right?

Not sure what you mean by "used to have", to be honest. I guess this
code had some prior life in an ACT tree, if you didn't write it? It
seems like the sort of check that only Ada would need.

And, this code is still in the patch below. It's definitely dead code,
though, so I assume you meant to remove it.

Should the "return 0;" cases in get_array_low_bound be errors? Or even
internal errors (probably not)? There's already lots of code that uses
TYPE_LOW_BOUND (TYPE_INDEX_TYPE (array_type)). If that's not valid, we
need to know why not.

--
Daniel Jacobowitz
CodeSourcery, LLC