Thread: gcc3.3 compliance
Dear all, SuSE 82 comes with gcc 3.3 installed by defaut, which is much strict then gcc 3.2. For example, here is a compilation error: if g++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/include/pgsql -I/space/pgadmin/wxGTK/install/lib/wx/include/gtk2ud-2.5 -I/space/pgadmin/wxGTK/install/include -D__WXDEBUG__ -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -I/space/pgadmin/wxGTK/install/include -DDATA_DIR=\"/usr/local/pgadmin3/share/pgadmin3/\" -Wall -g -I./include/ -I -g -O2 -MT pgSet.o -MD -MP -MF ".deps/pgSet.Tpo" \ -c -o pgSet.o `test -f 'db/pgSet.cpp' || echo './'`db/pgSet.cpp; \ then mv ".deps/pgSet.Tpo" ".deps/pgSet.Po"; \ else rm -f ".deps/pgSet.Tpo"; exit 1; \ fi db/pgSet.cpp: In member function `long int pgSet::GetLong(const wxString&)': db/pgSet.cpp:123: error: choosing `long int pgSet::GetLong(int) const' over ` long int pgSet::GetLong(const wxString&)' db/pgSet.cpp:123: error: because worst conversion for the former is better than worst conversion for the latter make[2]: *** [pgSet.o] Error 1 make[2]: Leaving directory `/space/pgadmin/pgadmin3/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/space/pgadmin/pgadmin3' make: *** [all] Error 2 Does it ring a bell to anyone? Cheers, Jean-Michel
Can you CVS update please? I fixed that yesterday (unless someone un-fixed it again). Regards, Dave. > -----Original Message----- > From: Jean-Michel POURE [mailto:jm.poure@freesurf.fr] > Sent: 12 June 2003 15:27 > To: pgadmin-hackers@postgresql.org > Subject: [pgadmin-hackers] gcc3.3 compliance > > > Dear all, > > SuSE 82 comes with gcc 3.3 installed by defaut, which is much > strict then gcc > 3.2. For example, here is a compilation error: > > if g++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/include/pgsql > -I/space/pgadmin/wxGTK/install/lib/wx/include/gtk2ud-2.5 > -I/space/pgadmin/wxGTK/install/include -D__WXDEBUG__ -D__WXGTK__ > -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES > -I/space/pgadmin/wxGTK/install/include > -DDATA_DIR=\"/usr/local/pgadmin3/share/pgadmin3/\" -Wall -g > -I./include/ -I > -g -O2 -MT pgSet.o -MD -MP -MF ".deps/pgSet.Tpo" \ > -c -o pgSet.o `test -f 'db/pgSet.cpp' || echo > './'`db/pgSet.cpp; \ then mv ".deps/pgSet.Tpo" > ".deps/pgSet.Po"; \ else rm -f ".deps/pgSet.Tpo"; exit 1; \ fi > db/pgSet.cpp: In member function `long int > pgSet::GetLong(const wxString&)': > db/pgSet.cpp:123: error: choosing `long int > pgSet::GetLong(int) const' over ` > long int pgSet::GetLong(const wxString&)' > db/pgSet.cpp:123: error: because worst conversion for the > former is better > than worst conversion for the latter > make[2]: *** [pgSet.o] Error 1 > make[2]: Leaving directory `/space/pgadmin/pgadmin3/src' > make[1]: *** [all-recursive] Error 1 > make[1]: Leaving directory `/space/pgadmin/pgadmin3' > make: *** [all] Error 2 > > Does it ring a bell to anyone? > Cheers, Jean-Michel > > > ---------------------------(end of > broadcast)--------------------------- > TIP 6: Have you searched our list archives? > http://archives.postgresql.org
On Thursday 12 June 2003 17:09, you wrote: > Can you CVS update please? I fixed that yesterday (unless someone > un-fixed it again). This is an error output from today. It only occurs under SuSE 82. Maybe we should wait for Adam patch review and then I will try again to compile under SuSE. Adam: The patch was for review, but I forgot to write it expressly, although I CC you. Sorry... Cheers, Jean-Michel
> -----Original Message----- > From: Jean-Michel POURE [mailto:jm.poure@freesurf.fr] > Sent: 12 June 2003 16:50 > To: pgadmin-hackers@postgresql.org > Cc: Adam Pendleton > Subject: Re: [pgadmin-hackers] gcc3.3 compliance > > > On Thursday 12 June 2003 17:09, you wrote: > > Can you CVS update please? I fixed that yesterday (unless someone > > un-fixed it again). > > This is an error output from today. It only occurs under SuSE > 82. Maybe we > should wait for Adam patch review and then I will try again > to compile under > SuSE. Dunno what it is then. It is *exactly* the error I saw, on exactly the same line of the file after Andreas commited a change. I added the cast to long and it was fine. Regards, Dave.
Dave Page wrote: > > >>-----Original Message----- >>From: Jean-Michel POURE [mailto:jm.poure@freesurf.fr] >>Sent: 12 June 2003 16:50 >>To: pgadmin-hackers@postgresql.org >>Cc: Adam Pendleton >>Subject: Re: [pgadmin-hackers] gcc3.3 compliance >> >> >>On Thursday 12 June 2003 17:09, you wrote: >> >> >>>Can you CVS update please? I fixed that yesterday (unless someone >>>un-fixed it again). >>> >>> >>This is an error output from today. It only occurs under SuSE >>82. Maybe we >>should wait for Adam patch review and then I will try again >>to compile under >>SuSE. >> >> > >Dunno what it is then. It is *exactly* the error I saw, on exactly the >same line of the file after Andreas commited a change. I added the cast >to long and it was fine. > > > This fix breaks win32 compilation, and I really don't know what kind of foolishness gcc does here. All GetXXX pairs are defined equally, but only GetLong will show that problem. The argument to GetLong is an int, and ColNumber returns int, that should make a perfect fit. With the fix applied, msdev will complain "two similar conversions". Maybe it helps if all GetXXX(int) are defined as GetXXX(const int); please check this. Regards, Andreas
Dear all, I tried to rebuild the RedHat9 rpm, here is the log (gcc 3.2): if g++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/include -I/usr/local/lib/wx/include/gtk2ud-2.5 -D__WXDEBUG__ -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -I/usr/local/include -DDATA_DIR=\"/usr/local/pgadmin3/share/pgadmin3/\" -Wall -g -I./include/ -I -g -O2 -MT pgSet.o -MD -MP -MF ".deps/pgSet.Tpo" \ -c -o pgSet.o `test -f 'db/pgSet.cpp' || echo './'`db/pgSet.cpp; \ then mv -f ".deps/pgSet.Tpo" ".deps/pgSet.Po"; \ else rm -f ".deps/pgSet.Tpo"; exit 1; \ fi db/pgSet.cpp: Dans member function « long int pgSet::GetLong(const wxString&) »: db/pgSet.cpp:123: choix de « long int pgSet::GetLong(int) const » à la place de « long int pgSet::GetLong(const wxString&) » db/pgSet.cpp:123: parce la plus mauvaise conversion de la déclaration initiale est meilleure que la plus mauvaise conversion de la dernière déclaration make[2]: *** [pgSet.o] Erreur 1 make[2]: Quitte le répertoire `/usr/src/redhat/BUILD/pgadmin3-20030613/src' make[1]: *** [all-recursive] Erreur 1 make[1]: Quitte le répertoire `/usr/src/redhat/BUILD/pgadmin3-20030613' make: *** [all] Erreur 2 error: Bad exit status from /var/tmp/rpm-tmp.22060 (%build) Cheers, Jean-Michel > Dave Page wrote: > >>-----Original Message----- > >>From: Jean-Michel POURE [mailto:jm.poure@freesurf.fr] > >>Sent: 12 June 2003 16:50 > >>To: pgadmin-hackers@postgresql.org > >>Cc: Adam Pendleton > >>Subject: Re: [pgadmin-hackers] gcc3.3 compliance > >> > >>On Thursday 12 June 2003 17:09, you wrote: > >>>Can you CVS update please? I fixed that yesterday (unless someone > >>>un-fixed it again). > >> > >>This is an error output from today. It only occurs under SuSE > >>82. Maybe we > >>should wait for Adam patch review and then I will try again > >>to compile under > >>SuSE. > > > >Dunno what it is then. It is *exactly* the error I saw, on exactly the > >same line of the file after Andreas commited a change. I added the cast > >to long and it was fine. > > This fix breaks win32 compilation, and I really don't know what kind of > foolishness gcc does here. All GetXXX pairs are defined equally, but > only GetLong will show that problem. > The argument to GetLong is an int, and ColNumber returns int, that > should make a perfect fit. With the fix applied, msdev will complain > "two similar conversions". Maybe it helps if all GetXXX(int) are defined > as GetXXX(const int); please check this. > > Regards, > Andreas > > > > ---------------------------(end of broadcast)--------------------------- > TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
> -----Original Message----- > From: Andreas Pflug [mailto:Andreas.Pflug@web.de] > Sent: 13 June 2003 09:09 > To: Dave Page; pgadmin-hackers@postgresql.org; Jean-Michel POURE > Subject: Re: [pgadmin-hackers] gcc3.3 compliance > > > Dave Page wrote: > > This fix breaks win32 compilation, and I really don't know > what kind of > foolishness gcc does here. All GetXXX pairs are defined equally, but > only GetLong will show that problem. > The argument to GetLong is an int, and ColNumber returns int, that > should make a perfect fit. With the fix applied, msdev will complain > "two similar conversions". Maybe it helps if all GetXXX(int) > are defined > as GetXXX(const int); please check this. Hmm, see what you mean. In my bleary-eyed attempt to fix it I misread the code and managed to fix it for me with a non-fix! I'll try the const fix... Regards, Dave.
> -----Original Message----- > From: Dave Page > Sent: 13 June 2003 09:34 > To: Andreas Pflug; pgadmin-hackers@postgresql.org; Jean-Michel POURE > Subject: Re: [pgadmin-hackers] gcc3.3 compliance > > > > Hmm, see what you mean. In my bleary-eyed attempt to fix it I > misread the code and managed to fix it for me with a non-fix! > > I'll try the const fix... Fixes Win32 but Linux is broken again. Incidently, snake has gcc 3.2.2, not 3.3. I'll have a play and see if I can come up with anything else. Regards, Dave.
On Friday 13 June 2003 10:42, Dave Page wrote: > Fixes Win32 but Linux is broken again. Incidently, snake has gcc 3.2.2, > not 3.3. This does not seem to be a gcc 3.2/3.3 issue. On both RedHat 9 (gcc 3.2) and SuSE 8.2 (gcc 3.3), the error is the same: if g++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/include/pgsql -I/space/pgadmin/wxGTK/install/lib/wx/include/gtk2ud-2.5 -I/space/pgadmin/wxGTK/install/include -D__WXDEBUG__ -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -I/space/pgadmin/wxGTK/install/include -DDATA_DIR=\"/usr/local/pgadmin3/share/pgadmin3/\" -Wall -g -I./include/ -I -g -O2 -MT pgSet.o -MD -MP -MF ".deps/pgSet.Tpo" \ -c -o pgSet.o `test -f 'db/pgSet.cpp' || echo './'`db/pgSet.cpp; \ then mv ".deps/pgSet.Tpo" ".deps/pgSet.Po"; \ else rm -f ".deps/pgSet.Tpo"; exit 1; \ fi db/pgSet.cpp: In member function `long int pgSet::GetLong(const wxString&)': db/pgSet.cpp:123: error: choosing `long int pgSet::GetLong(int) const' over ` long int pgSet::GetLong(const wxString&)' db/pgSet.cpp:123: error: because worst conversion for the former is better than worst conversion for the latter make[2]: *** [pgSet.o] Error 1 make[2]: Leaving directory `/space/pgadmin/pgadmin3/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/space/pgadmin/pgadmin3' make: *** [all] Error 2 Cheers, Jean-Michel
Jean-Michel POURE wrote: >On Friday 13 June 2003 10:42, Dave Page wrote: > > >>Fixes Win32 but Linux is broken again. Incidently, snake has gcc 3.2.2, >>not 3.3. >> >> > >This does not seem to be a gcc 3.2/3.3 issue. On both RedHat 9 (gcc 3.2) and >SuSE 8.2 (gcc 3.3), the error is the same: > > > This is a really nasty one. I recoded the method to not use the other, but have the complete code instead. Should make both worlds happy. Regards, Andreas