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?


>  | 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)


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