This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: What does this warning mean?
- To: peter dot simons at gmd dot de
- Subject: Re: What does this warning mean?
- From: Martin von Loewis <martin at mira dot isdn dot cs dot tu-berlin dot de>
- Date: Sun, 23 Aug 1998 10:30:59 +0200
- CC: egcs at cygnus dot com
- References: <x7g1eoq00k.fsf@peti.gmd.de>
> | 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)'
>
> Can anyone explain me what egcs is complaining about?
I'd think the error message is pretty clear. You have a prototype
declaration of RegExec in line 70 of RegExp.hpp that defines default
arguments.
You have another prototype declaration (or a definition) in line 74,
and this provides default arguments as well. It is an error to give
default arguments twice in standard C++.
Hope this helps,
Martin
(and yes, the source code of the respective lines in question would
have helped)