This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: What does this warning mean?
- To: Thomas Kunert <kunert at physik dot tu-dresden dot de>
- Subject: Re: What does this warning mean?
- From: Alexandre Oliva <oliva at dcc dot unicamp dot br>
- Date: 23 Aug 1998 23:56:41 -0300
- Cc: Peter Simons <peter dot simons at gmd dot de>, egcs at cygnus dot com
- References: <x7g1eoq00k.fsf@peti.gmd.de> <35DFE18D.95955AB2@physik.tu-dresden.de>
Thomas Kunert <kunert@physik.tu-dresden.de> writes:
> You should give default arguments only in the first declaration of a
> function, neither in subsequent declarations nor in the definition.
Although your statement is a good advice, for completeness, I should
say that it *is* possible to give additional default arguments in
redeclarations and even in the definition of a function. However, one
must not provide a default value for an argument that has already been
given a default value in the same scope.
--
Alexandre Oliva
mailto:oliva@dcc.unicamp.br mailto:aoliva@acm.org
http://www.dcc.unicamp.br/~oliva
Universidade Estadual de Campinas, SP, Brasil