This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH]: All unused functions and variables could be removed...
> I modify it, and add some code again...
I've reviewed this patch somewhat, here is what I found. Please note
that one of the maintainers would have to say a final word, but I
believe they will agree at least with some of my comments:
1. Please have a look at http://gcc.gnu.org/contribute.html. We need
a ChangeLog entry for each change, so we can later find out who
introduced a function. Also, please add a comment to each new
function, so we know what the purpose of this function is.
2. You modify c-parse.c. This is a generated file; you should modify
c-parse.y instead.
3. I feel that your approach of patching the assembler file after code
was already emitted is quite hackerish. It looks like this will
cause a lot of problems. For one thing, it does not work with the
-pipe option: you cannot call back data written into a
pipe. Instead, it would be better (IMHO) if the compiler avoided to
write the assembler code in the first place. Using the
"function-at-once" mode of the C++ front-end might be helpful.
Regards,
Martin