This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: What does this warning mean?


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]