RFC: Faster cp_lexer_peek_token [revised]
Zack Weinberg
zack@codesourcery.com
Thu Sep 23 06:58:00 GMT 2004
This patch is a revised version of the one I posted this morning,
<http://gcc.gnu.org/ml/gcc-patches/2004-09/msg02284.html>. See that
message for discussion of the basic change and why it is a good idea.
The revisions correct all of the regressions in the test suite which I
observed via testing on powerpc-darwin. I'm going to do overnight
testing on amd64-linux too. Most of the regressions were due to error
messages moving, and in many cases I decided that the new locations
were better. In particular, given a typical function definition
return_type function(argument list)
{
body
}
if g++ found something objectionable about the head, the diagnostic
used to issue on the line of the opening brace; now it appears on the
line of the head itself. I think this is better.
Considering the very large number of affected messages (and
consequently of modified test cases) though, I am wondering if this
patch is appropriate for stage 3. Comments would be appreciated.
Embedded in here is a tangential fix which causes g++ not to complain
about a declaration with no type when the type inbound to
grokdeclarator was error_mark_node, as this means some other
diagnostic has already been issued for that declaration. I noticed
this as a wrongness because some of those messages moved, and I
discovered a couple of places in the testsuite where they were marked
as bogus.
zw
-------------- next part --------------
A non-text attachment was scrubbed...
Name: faster-peek-token.2.patch
Type: text/x-patch
Size: 83646 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20040923/caee2902/attachment.bin>
More information about the Libstdc++
mailing list