Bug 143735 - Fails to build on GCC 4.3 snapshot (includes + end of line)
Summary: Fails to build on GCC 4.3 snapshot (includes + end of line)
Status: RESOLVED FIXED
Alias: None
Product: kdevelop
Classification: Applications
Component: general (show other bugs)
Version: 3.4.0
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-04-02 14:54 UTC by Jeremy Lainé
Modified: 2007-04-02 20:07 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
patch to fix KDevelop includes and end of lines (2.46 KB, patch)
2007-04-02 14:55 UTC, Jeremy Lainé
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jeremy Lainé 2007-04-02 14:54:23 UTC
Version:           3.4.0 (using KDE KDE 3.5.5)
Installed from:    Compiled From Sources
Compiler:          gcc 4.3 snapshot 
OS:                Linux

KDevelop 3.4.0 fails to build from source with GCC 4.3 snapshots.

In GCC 4.3, the C++ header dependencies have been cleaned up and a number of headers now need to be included directly. Some background of this can be found at:

http://gcc.gnu.org/PR28080

GCC 4.3 also produces an error on files with no end of line at the end of the file.
Comment 1 Jeremy Lainé 2007-04-02 14:55:04 UTC
Created attachment 20149 [details]
patch to fix KDevelop includes and end of lines
Comment 2 Andreas Pakulat 2007-04-02 17:11:13 UTC
Do you have a link that explains why the hell a missing newline is considered an error nowadays?
Comment 3 Jeremy Lainé 2007-04-02 17:21:14 UTC
There is an ongoing discussion on the GCC mailing list, it's not clear whether this will remain an error or get reverted to a warning:

http://gcc.gnu.org/ml/gcc/2007-03/msg01011.html

In any case, it would be nice to add the missing newline as it at least generates a warning.
Comment 4 Andreas Pakulat 2007-04-02 20:07:29 UTC
SVN commit 649461 by apaku:

Add c-includes to make gcc4.3 happy and also add some missing newlines-at-end-of-files.
Thanks to Jeremy Laine for the patch
BUG:143735


 M  +1 -0      languages/cpp/debugger/variablewidget.cpp  
 M  +1 -1      languages/cpp/setuphelper.cpp  
 M  +1 -0      lib/astyle/astyle.h  
 M  +1 -1      lib/cppparser/cachemanager.cpp  
 M  +1 -0      lib/cppparser/cachemanager.h  
 M  +1 -1      lib/cppparser/lexercache.cpp  


--- branches/KDE/3.5/kdevelop/languages/cpp/debugger/variablewidget.cpp #649460:649461
@@ -40,6 +40,7 @@
 #include <kapplication.h>
 #include <kmessagebox.h>
 
+#include <cctype>
 #include <set>
 #include <typeinfo>
 #include <cctype>
--- branches/KDE/3.5/kdevelop/languages/cpp/setuphelper.cpp #649460:649461
@@ -55,4 +55,4 @@
   return lines;
 }
 
-}
\ No newline at end of file
+}
--- branches/KDE/3.5/kdevelop/lib/astyle/astyle.h #649460:649461
@@ -29,6 +29,7 @@
 #ifndef ASTYLE_H
 #define ASTYLE_H
 
+#include <cctype>
 #include <string>
 #include <vector>
 
--- branches/KDE/3.5/kdevelop/lib/cppparser/cachemanager.cpp #649460:649461
@@ -86,4 +86,4 @@
 
 void CacheManager::saveMemory() {
   removeLowerHalf();
-}
\ No newline at end of file
+}
--- branches/KDE/3.5/kdevelop/lib/cppparser/cachemanager.h #649460:649461
@@ -15,6 +15,7 @@
 
 #ifndef CACHEMANAGER_H
 #define CACHEMANAGER_H
+#include <cstdlib>
 #include <set>
 #include <limits>
 
--- branches/KDE/3.5/kdevelop/lib/cppparser/lexercache.cpp #649460:649461
@@ -247,4 +247,4 @@
   m_fileModificationCache.clear();
 
   m_totalStringSet.clear(); ///it's unclear how often this should be emptied. It may happen that completely unused strings end up in this set, then deleting it will save us memory.
-}
\ No newline at end of file
+}