This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


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

Re: basic_block index negative?


On Wed, 17 Oct 2001, Daniel Egger wrote:

> I'm heftyly whacking the gcc sources at the moment because of all this
> signedness in the sources. Can someone please explain to me how the
> index of a basic_block is supposed to become negative? And if not,
> how can the return in this snippet
> 
> if (then_bb->index < 0)
>     return FALSE;
> 
ENTRY_BLOCK_PTR and EXIT_BLOCK_PTR have negative index numbers
(-1 and -2 respectively).

It's also important to keep the index as a signed int to allow
reverse traversals of the bb array.

Diego.


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