EPalmas345 / gpuocelot

Automatically exported from code.google.com/p/gpuocelot
0 stars 0 forks source link

./build.py breaks with g++ 4.8 because of newly enforced -Wunused-local-typedef #78

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
gcc 4.8 enables a new "unused" warning (with -Wall) as of 4.8. It is:

       "-Wunused-local-typedefs"

There appear to be a number of instances of this in the Ocelot code base as 
well as in included BOOST libraries. With the default "-Werror" this causes 
compilation to fail and needs to be cleaned up throughout at some point.

I noticed a number of projects that were bumping into this issue with a quick 
Google. I also noticed a posting by some of the Clang Folk who spoke 
approvingly of this new warning and were discussing adding to Clang, as well as 
checking for unused "private" typedefs in classes.

g++ -o .release_build/ocelot/ir/implementation/PTXKernel.os -c -O2 -Wall 
-Werror -std=c++0x -D_DEBUG -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS 
-D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -fPIC -I. -I/usr/include 
-I/usr/include -I/usr/local/include -I.release_build -I. 
ocelot/ir/implementation/PTXKernel.cpp
ocelot/ir/implementation/PTXKernel.cpp: In member function 'unsigned int 
ir::PTXKernel::getSharedMemoryLayout(std::map<std::basic_string<char>, unsigned 
int>&, std::map<std::basic_string<char>, unsigned int>&) const':
ocelot/ir/implementation/PTXKernel.cpp:565:43: error: typedef 'StringSet' 
locally defined but not used [-Werror=unused-local-typedefs]
  typedef std:: unordered_set<std::string> StringSet;
                                           ^
cc1plus: all warnings being treated as errors
scons: *** [.release_build/ocelot/ir/implementation/PTXKernel.os] Error 1
Build failed...
Build failed

Original issue reported on code.google.com by phillip....@gmail.com on 14 Oct 2012 at 6:09