On Sun, Jan 16, 2005 at 12:26:37PM -0500, Chuck Swiger wrote: > >program.c:49: warning: 'main' takes only zero or two arguments > >*** Error code 1 > [ ... ] > >I'm not sure what is required to disable this warning, but I'd like to see > >us make it optional and not keyed to lower warning levels (such as 3). > > Apparently, -Wunused-parameter is now being inferred from the combination > of -W and -Wall. The second error message is only generated when GCC > thinks it is compiling main() (or a moral equivalent thereof), so it > doesn't seem likely that that error would be generated for > dummyfunction(int arg1, int arg2, char *argv). > > However, I'll try to offer a patch which does what you've asked for and let > someone else (hopefully a GCC expert/language pedant :-) second guess > whether the following is a good idea: We're not going to hack GCC to deal with this. That is going way too far. This is coming up because people are using high WARNS values in Makefiles. Either back them down to a lower WARNS value; or we should add -Wno-unused-parameter to WARNS level 3. -- -- David (obrien_at_FreeBSD.org)Received on Sun Jan 16 2005 - 19:49:51 UTC
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:26 UTC