This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

-O1 -Winline


Hi there,

I was playing with gcc flags to test if my code was robust. And I try -Winline, according to the doc I need to use -O1 also. But if I try to compile anything that use a bit of the stl I get tons of warnings. Is this correct, is there something I should know ? Can I discard those warnings ?

For example, foo.cxx produce:

g++ -Winline -O1 -c foo.cxx
foo.cxx: In member function `typename std::_Deque_base<_Tp,
   _Alloc>::const_iterator std::deque<_Tp, _Alloc>::end() const [with _Tp =
   float, _Alloc = std::allocator<float>]':
foo.cxx:15: warning: inlining failed in call to `std::queue<float,
   std::deque<float, std::allocator<float> > >::~queue()'
foo.cxx:15: warning: called from here



Thanks
Mathieu
System: Debian testing, gcc 3.3.4
#include <queue>
#include <map>

class foo
{
public:
  typedef std::queue<float> QueueType;
  typedef std::map<int, float> SourcesType;
  SourcesType Sources;
  QueueType Queue;
};

int main()
{
  foo* f = new foo;
}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]