[Bug c++/63579] New attribute for empty member optimization

2018-10-03 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63579

Marc Glisse  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED
   Assignee|unassigned at gcc dot gnu.org  |jason at redhat dot com
   Target Milestone|--- |9.0

--- Comment #5 from Marc Glisse  ---
Fixed in r264813 .

[Bug c++/63579] New attribute for empty member optimization

2018-04-17 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63579

--- Comment #4 from Marc Glisse  ---
The following was adopted for C++20
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0840r2.html

ABI description (not merged yet)
https://github.com/itanium-cxx-abi/cxx-abi/pull/50

[Bug c++/63579] New attribute for empty member optimization

2017-10-10 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63579

Jonathan Wakely  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2017-10-10
 Ever confirmed|0   |1

[Bug c++/63579] New attribute for empty member optimization

2015-04-11 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63579

--- Comment #3 from Marc Glisse  ---
Hmm, it is more complicated than that. Done this way, I would need to teach
several places in the middle-end about fields of size 0. Currently I get
several ICEs, one in output_constructor_regular_field because DECL_SIZE_UNIT
(local->field) is NULL and we pass it to tree_to_uhwi to compute fieldsize;
another much more frequent one is smallest_mode_for_size(-1,MODE_INT) from
expand_debug_expr.

It seems that an "empty" member should appear as a base class not just for
layout, but for the whole middle-end (+debug), which already knows how to
handle that case. But it should still appear as a member to the front-end... I
don't know how to achieve something like that.


[Bug c++/63579] New attribute for empty member optimization

2015-04-05 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63579

Marc Glisse  changed:

   What|Removed |Added

  Attachment #33750|0   |1
is obsolete||

--- Comment #2 from Marc Glisse  ---
Created attachment 35233
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35233&action=edit
Handle empty members as bases

Slight update to mark classes with only empty members as empty, and reject the
attribute when it is applied to something that isn't a field declaration.


[Bug c++/63579] New attribute for empty member optimization

2014-10-17 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63579

--- Comment #1 from Marc Glisse  ---
Created attachment 33750
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33750&action=edit
Hack to handle empty members as bases