[Bug c++/20408] Unnecessary code generated for empty structs

2005-03-10 Thread pinskia at gcc dot gnu dot org
--- Additional Comments From pinskia at gcc dot gnu dot org 2005-03-10 17:15 --- (In reply to comment #9) > Eh, I was looking at the very same code... Can't we deal with EMPTY_CLASS_EXPR > similarly to USING_STMT? ;) ;) I think we should produce an empty CONSTRUCTOR (which I am testing

[Bug c++/20408] Unnecessary code generated for empty structs

2005-03-10 Thread pcarlini at suse dot de
--- Additional Comments From pcarlini at suse dot de 2005-03-10 17:13 --- Eh, I was looking at the very same code... Can't we deal with EMPTY_CLASS_EXPR similarly to USING_STMT? ;) ;) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20408

[Bug c++/20408] Unnecessary code generated for empty structs

2005-03-10 Thread pinskia at gcc dot gnu dot org
--- Additional Comments From pinskia at gcc dot gnu dot org 2005-03-10 17:07 --- >From cp-gimplifier.c: case EMPTY_CLASS_EXPR: /* We create an INTEGER_CST with RECORD_TYPE and value zero. */ *expr_p = build_int_cst (TREE_TYPE (*expr_p), 0); This is wrong. -- http://

[Bug c++/20408] Unnecessary code generated for empty structs

2005-03-10 Thread pinskia at gcc dot gnu dot org
--- Additional Comments From pinskia at gcc dot gnu dot org 2005-03-10 17:06 --- >From call.c: /* Don't pass empty class objects by value. This is useful for tags in STL, which are used to control overload resolution. We don't need to handle other cases of copying empty clas

[Bug c++/20408] Unnecessary code generated for empty structs

2005-03-10 Thread pcarlini at suse dot de
--- Additional Comments From pcarlini at suse dot de 2005-03-10 16:19 --- Andrew, is Daniel Berlin struct aliasing work likely to help, here? -- What|Removed |Added

[Bug c++/20408] Unnecessary code generated for empty structs

2005-03-10 Thread pinskia at gcc dot gnu dot org
--- Additional Comments From pinskia at gcc dot gnu dot org 2005-03-10 16:21 --- (In reply to comment #5) > Andrew, is Daniel Berlin struct aliasing work likely to help, here? No, fixing the front-end so it no longer produces a = 0 will most likely fix this as that is just wrong. --

[Bug c++/20408] Unnecessary code generated for empty structs

2005-03-10 Thread pinskia at gcc dot gnu dot org
--- Additional Comments From pinskia at gcc dot gnu dot org 2005-03-10 16:10 --- Werid on PPC, we get the most optimal code of __Z8call_foov: LFB2: b __Z3foo1X -- What|Removed |Added

[Bug c++/20408] Unnecessary code generated for empty structs

2005-03-10 Thread chris at bubblescope dot net
--- Additional Comments From chris at bubblescope dot net 2005-03-10 16:05 --- When you say "has no effect in final code", are you talking about the problem you noticed, or the problem as a whole? I find for each extra X I add to the type of foo I get a line much like: movb %al, 28(%es

[Bug c++/20408] Unnecessary code generated for empty structs

2005-03-10 Thread chris at bubblescope dot net
--- Additional Comments From chris at bubblescope dot net 2005-03-10 16:00 --- ignore my random changing of severity.. -- What|Removed |Added Severity|minor

[Bug c++/20408] Unnecessary code generated for empty structs

2005-03-10 Thread chris at bubblescope dot net
-- What|Removed |Added Severity|normal |minor http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20408