| delorie.com/archives/browse.cgi | search |
| X-Recipient: | archive-cygwin AT delorie DOT com |
| X-Spam-Check-By: | sourceware.org |
| X-YMail-OSG: | uI_6OB0VM1mwibi_zlraSVtewY3tzNtNm5IQxU2CFzCq7Kpp6LBRx2w3yC9eWXB32XO9E87UcVCDeoTAVNnr62iHrw-- |
| Message-ID: | <46ED8931.2010003@sbcglobal.net> |
| Date: | Sun, 16 Sep 2007 19:51:13 +0000 |
| From: | Greg Chicares <gchicares AT sbcglobal DOT net> |
| User-Agent: | Thunderbird 1.5.0.10 (Windows/20070221) |
| MIME-Version: | 1.0 |
| To: | cygwin AT cygwin DOT com |
| Subject: | Re: g++ bug |
| References: | <46ED3A34 DOT 2000903 AT sensi DOT org> |
| In-Reply-To: | <46ED3A34.2000903@sensi.org> |
| X-IsSubscribed: | yes |
| Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
| List-Id: | <cygwin.cygwin.com> |
| List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
| List-Archive: | <http://sourceware.org/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT cygwin DOT com> |
| List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
| Sender: | cygwin-owner AT cygwin DOT com |
| Mail-Followup-To: | cygwin AT cygwin DOT com |
| Delivered-To: | mailing list cygwin AT cygwin DOT com |
ICE on invalid code.
On 2007-09-16 14:14Z, Alexander Favorov wrote:
>
> typedef enum {unknown_output=-1,text_output=0,comment_output=1,html_output=2} output_mode_type;
'::text_output' is an enumerator.
> class Diagnostics:public ostringstream
> {
...
> public:
> output_mode_type output_mode;
> Diagnostics(output_mode_type o_mode);
> void text_output(ostream &)const;
'Diagnostics::text_output' is a member function.
...
> };
>
> inline Diagnostics::Diagnostics(output_mode_type o_mode=text_output):
^^^^^^^^^^^
> output_mode(o_mode){};
Which 'text_output'?
A later gcc version gives:
In file included from DiagnosticsTest.cpp:6:
Diagnostics.hpp:29: error: default argument for 'output_mode_type o_mode'
has type '<unresolved overloaded function type>'
To confirm that the code is erroneous, use
http://www.comeaucomputing.com/tryitout/
which will tell you about some other problems that
'g++ -W -Wall -std=c++98 -pedantic' would report as well.
To fix the reported error:
- inline Diagnostics::Diagnostics(output_mode_type o_mode=text_output):
+ inline Diagnostics::Diagnostics(output_mode_type o_mode=::text_output):
^^
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |