This is the mail archive of the gcc-bugs@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]

[Bug middle-end/38503] [4.4 regression] warnings from -isystem headers strikes back.



------- Comment #20 from rguenth at gcc dot gnu dot org  2009-02-02 10:23 -------
Same issue.  Only possible fix is to not apply TBAA pruning to escaped
symbols, which will - well - basically disable TBAA.  Testcase:

inline void *operator new (__SIZE_TYPE__, void *__p) throw() { return __p; }

struct Y {
  Y() {}
  int i;
};

struct X {
  X() {}
  void construct(const Y& y)
  {
    new (&m_data[0]) Y(y);
  }
  template <class T>
  Y& get() { return reinterpret_cast<Y&>(m_data); }
  bool initialized;
  char m_data[sizeof (Y)];
};

X x;

void bar(const X&);
void foo(Y& y)
{
  x.get<Y>() = y;
  x.initialized = true;
  bar(x);
}


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38503


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