Bug 267833 - KDevPlatform compilation fails due to mutable reference with gcc 4.6
Summary: KDevPlatform compilation fails due to mutable reference with gcc 4.6
Status: RESOLVED FIXED
Alias: None
Product: kdevplatform
Classification: Developer tools
Component: general (show other bugs)
Version: git master
Platform: Ubuntu Linux
: NOR normal
Target Milestone: 1.2.0
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-06 22:08 UTC by Luca
Modified: 2011-03-29 23:21 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Fix compilation errors due to mutable references. (4.88 KB, patch)
2011-03-06 22:08 UTC, Luca
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Luca 2011-03-06 22:08:40 UTC
Created attachment 57732 [details]
Fix compilation errors due to mutable references.

Version:           git master (using KDE 4.5.1) 
OS:                Linux

luca@laptop-luca:~/src/kdevelop/kdevplatform (master)$ g++ --version
g++ (GCC) 4.6.0 20110222 (experimental)

luca@laptop-luca:~/src/kdevelop/kdevplatform (master)$ make
...
[ 14%] Building CXX object language/CMakeFiles/kdevplatformlanguage.dir/kdevplatformlanguage_automoc.o
In file included from ~/src/kdevelop/kdevplatform/language/util/basicsetrepository.h:20:0,
                 from ~/src/kdevelop/kdevplatform/language/util/setrepository.h:17,
                 from ~/src/kdevelop/kdevplatform/language/duchain/topducontext.h:26,
                 from ~/src/kdevelop/kdevplatform/build/language/../../language/duchain/navigation/usescollector.h:24,
                 from ~/src/kdevelop/kdevplatform/build/language/moc_usescollector.cpp:10,
                 from ~/src/kdevelop/kdevplatform/build/language/kdevplatformlanguage_automoc.cpp:7:
~/src/kdevelop/kdevplatform/language/duchain/repositories/itemrepository.h:239:37: error: reference ‘m_registry’ cannot be declared ‘mutable’ [-fpermissive]
In file included from ~/src/kdevelop/kdevplatform/language/util/setrepository.h:17:0,
                 from ~/src/kdevelop/kdevplatform/language/duchain/topducontext.h:26,
                 from ~/src/kdevelop/kdevplatform/build/language/../../language/duchain/navigation/usescollector.h:24,
                 from ~/src/kdevelop/kdevplatform/build/language/moc_usescollector.cpp:10,
                 from ~/src/kdevelop/kdevplatform/build/language/kdevplatformlanguage_automoc.cpp:7:
~/src/kdevelop/kdevplatform/language/util/basicsetrepository.h:132:30: error: reference ‘repository’ cannot be declared ‘mutable’ [-fpermissive]
make[2]: *** [language/CMakeFiles/kdevplatformlanguage.dir/kdevplatformlanguage_automoc.o] Errore 1
make[1]: *** [language/CMakeFiles/kdevplatformlanguage.dir/all] Errore 2
make: *** [all] Errore 2

The attached patch fixes this.

Reproducible: Always
Comment 1 Milian Wolff 2011-03-06 22:32:06 UTC
David, is this OK?

@Luca: Please put patches on reviewboard the next time.
Comment 2 Milian Wolff 2011-03-06 22:32:19 UTC
PS: from my side it looks ok ;-)
Comment 3 Luca 2011-03-06 22:47:30 UTC
(In reply to comment #1)
> @Luca: Please put patches on reviewboard the next time.

Ok, sorry about that, I'm new to this :)
Comment 4 Milian Wolff 2011-03-29 23:21:02 UTC
comitted now, thanks