PATCH: Altivec context-sensitive keywords (round 2)
Tom Tromey
tromey@redhat.com
Sat Jul 12 19:22:00 GMT 2008
>>>>> "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
More information about the Gcc-patches
mailing list