[Patch] grokdeclarator cleanup (newb patch)

sashan sashang@ihug.co.nz
Tue Apr 20 02:02:00 GMT 2004


>This is an interesting patch, but I think it is the wrong
>refactorization.  There are several variables named 'name' in this
>function (one at top level, others in block scopes) and I suspect that
>some of them are write-only.  You should disentangle that first.  It
>may then become evident that some of this code is unnecessary.  You
>should also investigate the use of the %E format specifier for
>'error', 'warning', etc. - this allows you to write e.g.
>
>   error ("invalid use of '%E'", id);
>
>instead of 
>
>   error ("invalid use of '%s'", IDENTIFIER_POINTER (id));
>
>where id is an IDENTIFIER_NODE.  Note further that the %D in this 
>
>       error ("declarator-id missing; using reserved word `%D'", dname);
>
>is incorrect - %D takes a DECL node.  It should be %E.
>
>  
>

Thanks for the quick reply. I'll have a look at what you suggest.

>Have you filed a copyright assignment with the FSF yet?  We can't take
>substantial contributions without one.
>
>  
>
Nope, haven't filled in any forms. I looked around here 
http://gcc.gnu.org/contribute.html#legal
for some forms but it says "contact us (either via the gcc@gcc.gnu.org 
<mailto:gcc@gcc.gnu.org> list or the GCC maintainer
that is taking care of your contributions)" so I guess I could ask you 
for the forms?

-- 
sashan
http://www.cs.auckland.ac.nz/~sgov008/
Public Key: http://www.keyserver.net/en/ (search for key id 0x63B4EBF5) 





More information about the Gcc-patches mailing list