This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: What does this warning mean?
- To: jbuck at synopsys dot com (Joe Buck), egcs at cygnus dot com
- Subject: Re: What does this warning mean?
- From: Jason Merrill <jason at cygnus dot com>
- Date: 24 Aug 1998 15:31:12 -0700
- References: <199808230830.KAA00256@mira.isdn.cs.tu-berlin.de> <199808241519.IAA24851.cygnus.egcs@atrus.synopsys.com>
>>>>> 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