This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [rfa/symtab] array bounds, int -> enum


Michael Elizabeth Chastain <mec@shout.net> writes:
> I removed the FIXME because it is a bad idea.  Code in valops.c and
> varobj.c, among other places, check the bound type (although they do it
> trivially).  I don't see any language specifier in main_type; the
> language is over in the symbol code, not in the type code.  So it would
> be difficult, and probably useless, to make all code that looks at array
> bound types check whether the type is a "FORTRAN type" or not before
> looking at the array bounds.  Just use appropriate bound types for all
> array symbols in all languages and be done with it.

I think deleting the FIXME is fine.

If one were going to do that, one would indicate whether they applied
by splitting TYPE_CODE_ARRAY into TYPE_CODE_ARRAY and
TYPE_CODE_FORTRAN_ARRAY, or something --- that is, let the
discriminant say which fields are present / meaningful.  But we don't
really do that, so it's not worth it.

> Testing: the usual drill, native i686-pc-linux-gnu, gcc v2 and v3,
> dwarf-2 and stabs+.
> 
> Okay to apply?

Yes, please do.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]