Patch to compile under gcc-2.95
Bernd Kratz
ben at micromata.com
Tue Aug 17 10:33:47 UTC 1999
Hi,
I tried to compile kdevelop-1.0beta1 with the new
gcc-2.95. The gcc-2.95 seems to be very strict in using "new" keywords.
It detects "export" as a new keyword and produces an error.
The attachment is a small patch, that changes the name of the
export-flag
in the classparser-files from "export" to "exportFlag".
Another problem is the color manangement
in ckdevinstall.cpp (line 118) and ktipofday.cpp (line 66).
The compiler produces a lot of:
/opt/local/egcs/bin/c++ --permissive -DHAVE_CONFIG_H -I. -I. -I..
-I/opt/kde/include -I/usr/lib/qt/include -I/usr/X11R6/include -O2 -c
ckdevinstall.cpp
ckdevinstall.cpp: In method `CKDevInstall::CKDevInstall(QWidget * = 0,
const cha
r * = 0)':
ckdevinstall.cpp:118: call of overloaded `QColor(int)' is ambiguous
/usr/lib/qt/include/qcolor.h:65: candidates are: QColor::QColor(unsigned
int, un
signed int = 0ffffffff)
/usr/lib/qt/include/qcolor.h:66: QColor::QColor(const
char *)
/usr/lib/qt/include/qcolor.h:67: QColor::QColor(const
QColor &)
<near match>
:
:
:
best regards,
ben
BTW:
KDevelop is great !!!
--
Micromata GmbH http://www.micromata.de
Bernd Kratz email: Bernd.Kratz at micromata.de
Ochshäuserstr.45 phone: +49-(0)-561-57063-13
D-34123 Kassel fax..: +49-(0)-561-57063-19
-------------- next part --------------
diff -u --recursive --new-file kdevelop-1.0beta1/kdevelop/classparser/ParsedParent.cc.orig kdevelop-1.0beta1/kdevelop/classparser/ParsedParent.cc
--- kdevelop-1.0beta1/kdevelop/classparser/ParsedParent.cc.orig Tue Aug 17 11:27:48 1999
+++ kdevelop-1.0beta1/kdevelop/classparser/ParsedParent.cc Tue Aug 17 11:46:45 1999
@@ -101,7 +101,7 @@
{
assert( aExport == PUBLIC || aExport == PRIVATE || aExport == PROTECTED );
- export = aExport;
+ exportFlag = aExport;
}
/*********************************************************************
@@ -123,7 +123,7 @@
{
cout << " " << name << "(";
- switch(export)
+ switch(exportFlag)
{
case PUBLIC:
cout << "public";
@@ -152,7 +152,7 @@
{
dataStr = "";
- switch(export)
+ switch(exportFlag)
{
case PUBLIC:
dataStr += "public";
diff -u --recursive --new-file kdevelop-1.0beta1/kdevelop/classparser/ParsedParent.h.orig kdevelop-1.0beta1/kdevelop/classparser/ParsedParent.h
--- kdevelop-1.0beta1/kdevelop/classparser/ParsedParent.h.orig Tue Aug 17 11:27:55 1999
+++ kdevelop-1.0beta1/kdevelop/classparser/ParsedParent.h Tue Aug 17 11:26:54 1999
@@ -57,7 +57,7 @@
QString name;
/** Export type of the inheritance */
- int export;
+ int exportFlag;
public: // Public methods to set attribute values
@@ -79,9 +79,9 @@
void out();
public: // Public queries
- bool isPublic() { return ( export == PUBLIC ); }
- bool isProtected() { return ( export == PROTECTED ); }
- bool isPrivate() { return ( export == PRIVATE ); }
+ bool isPublic() { return ( exportFlag == PUBLIC ); }
+ bool isProtected() { return ( exportFlag == PROTECTED ); }
+ bool isPrivate() { return ( exportFlag == PRIVATE ); }
};
diff -u --recursive --new-file kdevelop-1.0beta1/kdevelop/classparser/ClassParser.cc.orig kdevelop-1.0beta1/kdevelop/classparser/ClassParser.cc
--- kdevelop-1.0beta1/kdevelop/classparser/ClassParser.cc.orig Tue Aug 17 11:44:53 1999
+++ kdevelop-1.0beta1/kdevelop/classparser/ClassParser.cc Tue Aug 17 11:45:19 1999
@@ -971,7 +971,7 @@
{
CParsedParent *aParent; // A parent of this class.
QString cname; // Name of inherited class.
- int export=-1; // Parent import status(private/public/protected).
+ int exportFlag=-1; // Parent import status(private/public/protected).
// Add parents until we find a {
while( lexem != '{' && lexem != 0 )
@@ -981,10 +981,10 @@
// For classes with no scope identifier at inheritance.
if( lexem == ID )
- export = PRIVATE;
+ exportFlag = PRIVATE;
else if( lexem == PUBLIC || lexem == PROTECTED || lexem == PRIVATE )
{
- export = lexem;
+ exportFlag = lexem;
getNextLexem();
}
@@ -996,11 +996,11 @@
}
// Add the parent.
- if( export != -1 )
+ if( exportFlag != -1 )
{
aParent = new CParsedParent();
aParent->setName( cname );
- aParent->setExport( export );
+ aParent->setExport( exportFlag );
aClass->addParent( aParent );
}
diff -u --recursive --new-file kdevelop-1.0beta1/kdevelop/ckdevelop_noslot.cpp.orig kdevelop-1.0beta1/kdevelop/ckdevelop_noslot.cpp
--- kdevelop-1.0beta1/kdevelop/ckdevelop_noslot.cpp.orig Tue Aug 17 11:55:30 1999
+++ kdevelop-1.0beta1/kdevelop/ckdevelop_noslot.cpp Tue Aug 17 11:55:56 1999
@@ -306,7 +306,7 @@
char ch;
int i;
bool bFound;
- char *szChangingChars= (bForGrep) ? "[]\\^$" : "$^*[]|()\\;,#<>-.~{}" ;
+ const char *szChangingChars= (bForGrep) ? "[]\\^$" : "$^*[]|()\\;,#<>-.~{}" ;
while ((ch=*szOldText++)!='\0')
{
More information about the KDevelop-devel
mailing list