Thread overview | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
December 07, 2004 Possibility of the bug | ||||
---|---|---|---|---|
| ||||
Hi! We had added recently some new code within wxWidgets CVS which I found to cause error with (and only with) DMC. It was little discuted in wx-dev mailing list and there is suspicion that there is bug in DMC but I'm not enough skilled to seriously confirm that myself and it is very hard to debug it down to minimal code to duplicate it trimming wxWidgets class by class so I post here in case anyone could give us a hand here. The thread about the error is available at: http://lists.wxwidgets.org/cgi-bin/ezmlm-cgi?5:sss:55259 I myself made a "-l -e" listing of the code so can provide it if it would be necessary and helpful. It's 4.729.824 bytes long (which is hardly minimal sample :-( ). The test and wxWidgets was build with command: smake /NOLOGO /F makefile.dms SHARED=0 RUNTIME_LIBS=static UNICODE=0 MONOLITHIC=1 BUILD=release USE_GUI=1 USE_OPENGL=0 USE_ODBC=0 WXUNIV=0 Thanks in advance for any help. ABX |
December 07, 2004 Re: Possibility of the bug | ||||
---|---|---|---|---|
| ||||
Posted in reply to W³odzimierz Skiba | I don't make a promise, but I will look into it as soon as possible.
Might take a while I'm very very busy right now.
Arjan
W³odzimierz Skiba wrote:
> Hi!
>
> We had added recently some new code within wxWidgets CVS which I found to cause error with (and only with) DMC. It was little discuted in wx-dev mailing list and there is suspicion that there is bug in DMC but I'm not enough skilled to seriously confirm that myself and it is very hard to debug it down to minimal code to duplicate it trimming wxWidgets class by class so I post here in case anyone could give us a hand here. The thread about the error is available at:
>
> http://lists.wxwidgets.org/cgi-bin/ezmlm-cgi?5:sss:55259
>
> I myself made a "-l -e" listing of the code so can provide it if it would be necessary and helpful. It's 4.729.824 bytes long (which is hardly minimal sample :-( ). The test and wxWidgets was build with command:
>
> smake /NOLOGO /F makefile.dms SHARED=0 RUNTIME_LIBS=static UNICODE=0 MONOLITHIC=1 BUILD=release USE_GUI=1 USE_OPENGL=0 USE_ODBC=0 WXUNIV=0
>
> Thanks in advance for any help.
>
> ABX
|
December 07, 2004 Re: Possibility of the bug | ||||
---|---|---|---|---|
| ||||
Posted in reply to W³odzimierz Skiba | Hi, I'm reposting this since it didn't seem to get though, so appolgies if we end up with two copies. ABX, I've prepared a minimal example, does this demonstrate the problem on your machine too, I think maybe you are using a newer version than me? ------------------------------------------------------- Y:\>r:\dm\bin\dmc | head -1 Digital Mars Compiler Version 8.38n Y:\>type mini.cpp #include <stdio.h> #define _T(x) x typedef char wxChar; class wxFile { public: wxFile(const wxChar*) { printf("wxFile\n"); } }; class wxString { public: wxString(const wxChar*) { printf("wxString\n"); } operator const wxChar*() const { return _T(""); } }; class wxFileInputStream { public: wxFileInputStream(const wxString&) { } wxFileInputStream(wxFile&) { } }; int main() { wxFileInputStream *p = new wxFileInputStream(_T("mytext.dat")); delete p; return 0; } Y:\>r:\dm\bin\dmc mini.cpp wxFileInputStream *p = new wxFileInputStream(_T("mytext.dat")); ^ mini.cpp(27) : Warning 11: non-const reference initialized to temporary link mini,,,user32+kernel32/noi; Y:\>mini wxFile Y:\> ------------------------------------------------------- I hope this is helpful. Regards, Mike |
December 08, 2004 Re: Possibility of the bug | ||||
---|---|---|---|---|
| ||||
Posted in reply to Mike Wetherell | Mike Wetherell <mike.wetherell@ntlworld.com> wrote in news:cp5dlq$2p1m$1@digitaldaemon.com: > ABX, I've prepared a minimal example, does this demonstrate the problem on your machine too Yes, indeed, thanks! I pasted your minimal sample into our tests/streams/datastreamtest.cpp and run it through our building process. The error was: wxFileInputStream *p = new wxFileInputStream(_T("mytext.dat")); ^ streams\datastreamtest.cpp(27) : Error: reference must refer to same type or be const Had: char * and: wxFile& > I think maybe you are > using a newer version than me? I used latests DMC beta. > Y:\>r:\dm\bin\dmc mini.cpp Perhaps the problems is in one of the compiler flags? Complete command line wxWidgets/bakefile generated was: dmc -mn -c -odmc_msw\test_datastreamtest.obj -o -D__WXMSW__ -I.\..\include -I.\..\lib\dmc_lib\msw -w- -I. -Ar -Ae .\streams\datastreamtest.cpp ABX |
December 09, 2004 Re: Possibility of the bug | ||||
---|---|---|---|---|
| ||||
Posted in reply to W³odzimierz Skiba | W³odzimierz Skiba wrote:
> Mike Wetherell <mike.wetherell@ntlworld.com> wrote in news:cp5dlq$2p1m$1@digitaldaemon.com:
>> ABX, I've prepared a minimal example, does this demonstrate the problem on your machine too
>
> Yes, indeed, thanks!
Ok, thats good :-)
Regards,
Mike
|
December 24, 2004 Re: Possibility of the bug | ||||
---|---|---|---|---|
| ||||
Posted in reply to W³odzimierz Skiba | "W³odzimierz Skiba" <abx@abx.art.pl> wrote in news:cp7f9a$2pbt$1@digitaldaemon.com: > Mike Wetherell <mike.wetherell@ntlworld.com> wrote in news:cp5dlq$2p1m$1@digitaldaemon.com: >> ABX, I've prepared a minimal example, does this demonstrate the problem on your machine too > > Yes, indeed, thanks! I pasted your minimal sample into our tests/streams/datastreamtest.cpp and run it through our building process. The error was: > > wxFileInputStream *p = new wxFileInputStream(_T("mytext.dat")); > ^ > streams\datastreamtest.cpp(27) : Error: reference must refer to same > type Since there was no sign that this topic was accepted as valid bug report, Walter, could you please comfirm that it was added to your bug list or that we need to do something more for you? Thanks in advance and Merry Christmas! ABX |
December 27, 2004 Re: Possibility of the bug | ||||
---|---|---|---|---|
| ||||
Posted in reply to W³odzimierz Skiba | "W³odzimierz Skiba" <abx@abx.art.pl> wrote in message news:cqgko8$29dg$1@digitaldaemon.com... > Since there was no sign that this topic was accepted as valid bug report, Walter, could you please comfirm that it was added to your bug list or that > we need to do something more for you? Yes, it's on the list. Thanks! |
December 27, 2004 Re: Possibility of the bug | ||||
---|---|---|---|---|
| ||||
Posted in reply to Mike Wetherell | "Mike Wetherell" <mike.wetherell@ntlworld.com> wrote in message news:cp5dlq$2p1m$1@digitaldaemon.com... > ABX, I've prepared a minimal example, does this demonstrate the problem on your machine too, I think maybe you are using a newer version than me? I've boiled that example down to this which generates the same error message: --------------------------------------- struct wxFile { wxFile(const char*); }; struct wxString { wxString(const char*); }; struct wxFileInputStream { wxFileInputStream(const wxString&); wxFileInputStream(wxFile&); }; void test() { new wxFileInputStream("mytext.dat"); } -------------------------------------------- It looks to me like the code is wrong, i.e. which wxFileInputStream should it pick? |
December 27, 2004 Re: Possibility of the bug | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter | Walter wrote:
> It looks to me like the code is wrong, i.e. which wxFileInputStream should it pick?
I think it should choose the other one. I.e. not consider the illegal conversion path as one of the possibilities.
I can't point to where in the standard it says DMC is wrong though. So if you tell me the standard is ambiguous then I'll believe you. OTOH it makes more sense the other way, and other compilers all do it that way.
Regards,
Mike
|
December 28, 2004 Re: Possibility of the bug | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter | "Walter" <newshound@digitalmars.com> wrote in news:cqokq7$u8i$1@digitaldaemon.com: > > "Mike Wetherell" <mike.wetherell@ntlworld.com> wrote in message news:cp5dlq$2p1m$1@digitaldaemon.com... >> ABX, I've prepared a minimal example, does this demonstrate the problem on your machine too, I think maybe you are using a newer version than me? > > I've boiled that example down to this which generates the same error > message: > [cut] > It looks to me like the code is wrong, i.e. which wxFileInputStream > should it pick? For interested, the answer was at the http://lists.wxwidgets.org/cgi-bin/ezmlm-cgi?5:mss:55898 ABX |
Copyright © 1999-2021 by the D Language Foundation