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?


>>>>> Joe Buck <jbuck@synopsys.com> writes:

 >> > 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++.

 > Correct, but in the past g++ ignored this problem (in fact, it's unclear
 > to me exactly what happened if the values of the default arguments
 > differ: do you get the last one the compiler saw, or the first one).

Not exactly; it ignored a redefinition to the same value.  That code hasn't
changed, and a quick test verifies that behavior.  I'd need a testcase to
determine why this isn't working in this case.

Jason


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