VOID_TYPE_P and error_mark_node

Mark Mitchell mark@codesourcery.com
Wed Jun 7 12:14:00 GMT 2000

>>>>> "Geoff" == Geoff Keating <geoffk@cygnus.com> writes:

    Geoff> Recently, a number of tests of the form

    Geoff>    foo == void_type_node

    Geoff> have been changed to

    Geoff>    VOID_TYPE_P (foo)

    Geoff> This is fine, but before when 'foo' was error_mark_node the
    Geoff> test would fail, and now it causes an
    Geoff> --enable-checking=tree error.

    Geoff> The attached patch changes VOID_TYPE_P so that it rejects
    Geoff> error_mark_node.  This seemed like the easiest thing.  It
    Geoff> fixes all of the tree checking failures in C++.

    Geoff> Bootstrapped & tests OK on powerpc-unknown-linux-gnu.  OK
    Geoff> to commit?

I think a better choice would just be:


That's objectively the right definition for that macro, I think; it's
equivalent to the current definition, but doesn't have this problem.

Does that work?

Mark Mitchell                   mark@codesourcery.com
CodeSourcery, LLC               http://www.codesourcery.com

More information about the Gcc-patches mailing list