--- Comment #10 from navinkumar+bugs at gmail dot com 2009-11-09 18:08
---
After review, I agree it is not a bug.
Because _0_emptyB and _2_emptyB both inherent from empty_t, the compiler is
obligated to ensure that
static_cast(static_cast<_0_emptyB*>(compositeB2)) !=
stati
--- Comment #8 from navinkumar+bugs at gmail dot com 2009-11-09 17:39
---
Created an attachment (id=19000)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19000&action=view)
demonstrates scenarios when zero-size base class optimization fails, compile
with flag: -st
--- Comment #7 from navinkumar+bugs at gmail dot com 2009-11-09 17:35
---
(From update of attachment 18986)
>#include
>#include
>#include
>#include
>
>struct empty_t {
> template
> explicit empty_t(Arg arg) { }
>};
>
>template
>str
--- Comment #4 from navinkumar+bugs at gmail dot com 2009-04-30 19:22
---
Since std::is_empty<_2_emptyB>::value && std::is_empty<_2_emptyA>::value (as
verified by the static assertions), GCC should not treat _2_emptyB differently
from _2_emptyA when computing th
--- Comment #2 from navinkumar+bugs at gmail dot com 2009-04-30 18:57
---
Tested with 2 versions of GCC, same behavior;
Version #1
Using built-in specs.
Target: x86_64-unknown-linux-gnu
Configured with: /1123/scratch/gcc4.4.0/src/configure
--prefix=/1123/software/gcc4.4.0 --with-local
--- Comment #1 from navinkumar+bugs at gmail dot com 2009-04-30 18:54
---
Created an attachment (id=17785)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17785&action=view)
demonstrates scenarios when zero-size base class optimization fails
compile with flag: -st
P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: navinkumar+bugs at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39981