This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Reformatting patch
- To: mark at codesourcery dot com
- Subject: Re: Reformatting patch
- From: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- Date: Sat, 18 Dec 99 21:04:39 EST
- Cc: gcc-patches at gcc dot gnu dot org
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.