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

--- Comment #3 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-09-03 
12:00:49 UTC ---
(In reply to comment #2)
> I've never used any unint32_t tu hold any pointer-to-member, 
> I just tested and find out the sizeof (pointer-to-member-function) is 16, 
> then i used a pointer-to-uint32_t four times to dump the value of the
> pointer-to-member, 32bits by 32bits.
>
> According my understanding to the standard, this conversion should be valid, 
> or
> there must be any valid way . 

The above violates C++ aliasing rules but would be supported by GCC as an
extension with -O[01] or -fno-strict-aliasing.  The standard only allows
accessing the storage via a character type (thus, dump 16 individual bytes via
a char * pointer).

> (In reply to comment #1)
> > uint32_t isn't big enough to hold a pointer-to-member value, and that
> > conversion isn't valid anyway

Reply via email to