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: Reformatting patch


    If you're really going to make these changes, surely you should use
    NULL_TREE not `0'?  I assume you think pointers shouldn't be used as
    booleans.  But, now you've made them look like integers, which is even
    worse.

Perhaps, but most of the GCC sources do use the above convention and
I've made passes in the past to use them.  So code that doesn't do
the comparison with zero is inconsistent with the approach of the
majority of the code.

I agree that all three convensions are reasonable (leaving out the
comparison, comparing with zero, or comparing with NULL_TREE), but the
point is consistency and currently the majority of the compiler uses
the second.

    Bssides, the GNU coding conventions don't require the `!=' bit.  This
    idiom is nearly ubiquitous in C code.  In fact, in the C++ front-end,
    I know that Jason and I explicitly agreed *not* to use the `!=' bit.

That's reasonable because it's a somewhat distinct piece of code and
can certainly have a slightly different convention.


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