Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
GoogleCodeExporter opened this issue Mar 15, 2016 · 0 comments

Comments

@GoogleCodeExporter
Copy link

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 [email protected] on 14 Oct 2012 at 6:09

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant