This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: Altivec context-sensitive keywords (round 2)
- From: Tom Tromey <tromey at redhat dot com>
- To: Ben Elliston <bje at au1 dot ibm dot com>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>, dje at watson dot ibm dot com, janis187 at us dot ibm dot com
- Date: Sat, 12 Jul 2008 11:40:31 -0600
- Subject: Re: PATCH: Altivec context-sensitive keywords (round 2)
- References: <1215065112.25281.8.camel@helios>
- Reply-to: Tom Tromey <tromey at redhat dot com>
>>>>> "Ben" == Ben Elliston <bje@au1.ibm.com> writes:
Ben> Here is a further refined patch. I think this one addresses all of the
Ben> concerns Tom raised at the outset. Note that this patch supersedes the
Ben> patch I posted on Tuesday:
Ben> http://gcc.gnu.org/ml/gcc-patches/2008-07/msg00008.html
Some more comments... sorry about the delay on this.
Ben> Tested with a bootstrap on powerpc64-linux and a regression testsuite
Ben> run on powerpc-linux and powerpc64-linux. Okay for mainline?
Note that I can only approve the libcpp bits.
Ben> + if (ident == C_CPP_HASHNODE (vector_keyword) || ident == C_CPP_HASHNODE (__vector_keyword))
Need to wrap these long lines.
Ben> - ENUM_BITFIELD(node_type) type : 8; /* CPP node type. */
Ben> - unsigned char flags; /* CPP flags. */
Ben> + ENUM_BITFIELD(node_type) type : 7; /* CPP node type. */
Ben> + unsigned int flags : 9; /* CPP flags. */
The libcpp parts are fine provided this change doesn't excessively
impact code size or performance. Ordinarily I wouldn't look at this,
but a similar patch of mine elsewhere got critiqued on this
basis... so I know some other maintainers are thinking about it.
I'm still of the opinion that a conditional keyword would have a less
confusing impact on the compiler. Mucking around with libcpp data
structures is dangerous -- but a condition or two in the C FE would
not be.
Tom