This is the mail archive of the gcc-patches@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: PATCH: Tree checking failure in C++


    Actually, I think there's a pretty clear existing preference for using
    `error_mark_node'.  

    Finally, the `error_mark_node' test is perhaps better in two ways:

      - It's probably faster, since it doesn't involve any data access.

Not that it's a big issue but on most RISC machines, and any PIC 
configuration, the value of "error_mark_node" needs *two* data reference:
one to pick up the address from a table and oe to get the current value.
So testing the code is faster.

      - It reminds us that there is supposed to be only one node with
        ERROR_MARK set, ever.

True.

      - Finally, since ERROR_MARK tends to be zero, lots of random
        storage ends up looking like an ERROR_MARK, which can mask
        real errors.  Using error_mark_node makes it easier to find
        those errors.

Likewise, except we probably ought to change ERROR_MARK so it's nonzero
in any case.

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