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 #12 from rguenth at gcc dot gnu dot org  2009-01-23 16:52 -------
this is placement-new related.

D.20941_8 = &ox

ox = { } no-tbaa-pruning
D.20941_8 = { ox }

alias warning for D.20941_8

After alias:

  ox.D.20531.m_initialized = 0;
  D.20941_8 = (struct X *) &ox.D.20531.m_storage.dummy_.data[0];
  D.20941_8->e_ = 0;
  ox.D.20531.m_initialized = 1;
  D.20946_10 = ox.D.20531.m_initialized;

Before:

  ox.D.20531.m_initialized ={v} 0;
  <<<change_dynamic_type (struct X *) &ox.D.20531.m_storage.dummy_.data[0])>>>
  D.20941_8 = (struct X *) &ox.D.20531.m_storage.dummy_.data[0];
  D.20941_8->e_ ={v} 0;
  ox.D.20531.m_initialized ={v} 1;
  D.20946_10 = ox.D.20531.m_initialized;

so it looks like we do placement new on _parts_ of an object that
continues to live over that placement new.

Uh oh.  Is this even legal?


-- 


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]