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: RFC: Slay COERCE_FLOAT_TO_DOUBLE


On Tue, Jan 07, 2003 at 07:19:28PM -0500, Andrew Cagney wrote:
> 
> >Daniel's patch keeps the current data structure, which uses 1 bit
> >to indicate whether the function is prototyped or not.
> >
> >I prefer to use 2 bits: TYPE_PROTO_KNOWN and TYPE_PROTO_YES.
> >That allows for three states:
> >
> >  known=0		gdb does not know if function is prototyped
> >  known=1, yes=0	function is definitely not prototyped
> >  known=1, yes=1	function is definitely prototyped
> >
> >I have written such a 2-bit patch.
> 
> To be pedantic :-)  That's an enum with three states:
> 
> 	prototype unknown
> 	prototyped
> 	unprototyped
> 
> It can be packed into two bits.

If we want to go this way, then it should probably be done with four
states anyway:
  User prototyped vs. not
  Type is declared-as vs. called-as

I didn't do this because the usefulness of the extra information is
pretty minor; but we certainly could do it.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


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