(i386-linux x sh-elf) build breakage

Alexandre Oliva aoliva@redhat.com
Tue Jul 25 18:55:00 GMT 2000


On Jul 25, 2000, Richard Henderson <rth@cygnus.com> wrote:

> On Thu, Jul 20, 2000 at 06:12:55AM -0300, Alexandre Oliva wrote:
>> +      printf ("#define INSN_ADDRESSES_DEFN() varray_type insn_addresses_\n");

> I don't like this.  You should just declare the thing
> in final.c and be done with it.

I wanted to completely abstract away its type, so that it could be
changed to something else in a single place.

For example, then we could add a #define for machines that needs the
ability to add new insns to insn_addresses, and use a plain array
otherwise.

>> +      printf ("#define INSN_ADDRESSES_PUSH(v) VARRAY_PUSH_INT (insn_addresses_, (v))\n\n");

> This must be wrong, since there's no correspondence to the UID
> of the insn for which you are adding the address.

> Hum.. I see you've fudged it, but I still don't like it.  You
> might as well just resize the array and assign the new entry.

Since it would have been an error to do it after insn_addresses is
constructed, I thought it would be fine.  Maybe I should add one
argument to INSN_ADDRESSES_PUSH, with the UID of the new insn (or the
insn itself).  The idea is to help catching as soon as possible the
creation of insns without additions to INSN_ADDRESSES.


BTW, I've just found an error in the patch, while building on a target
that doesn't HAVE_ATTR_length: INSN_ADDRESSES_FREE had to be
`#ifdef'ed away, and `INSN_ADDRESSES_DEFN()' was parsed as a
function declaration :-)

With these corrections, ok to install?

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist    *Please* write to mailing lists, not to me



More information about the Gcc-bugs mailing list