What does this warning mean?
Thomas Kunert
kunert@physik.tu-dresden.de
Sun Aug 23 04:36:00 GMT 1998
Peter Simons wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
>
> My egcs warns me and I don't have the slightest idea what he's
> complaining about. I am compiling a C++ class which models regular
> expressions in C++. When compiling with "-Wall -ansi -pedantic -O2", I
> get the following warnings:
>
> | RegExp.hpp:74: warning: default argument given for parameter 3 of `
> | bool RegExec(const class string &, const class RegExp &,
> | struct regmatch_t * = 0, size_t = 0, int = 0)'
> | RegExp.hpp:70: warning: after previous specification in `
> | bool RegExec(const class string &, const class RegExp &,
> | struct regmatch_t * = 0, size_t = 0, int = 0)'
You should give default arguments only in the first declaration of a
function, neither in subsequent declarations nor in the definition.
--
Thomas Kunert
More information about the Gcc
mailing list