Re: const and strict aliasing rules

2006-12-04 Thread Gabriel Dos Reis
Andrew Pinski <[EMAIL PROTECTED]> writes: | > | > Andrew Pinski <[EMAIL PROTECTED]> writes: | > | > | > You can work around this by using union's of pointers of both non-const | > | > and const types, but the reinterpret_cast solution would be more attractive. | > | > | > | > Thoughts? | > |

Re: const and strict aliasing rules

2006-12-04 Thread Andrew Pinski
> > Andrew Pinski <[EMAIL PROTECTED]> writes: > > | > You can work around this by using union's of pointers of both non-const > | > and const types, but the reinterpret_cast solution would be more > attractive. > | > > | > Thoughts? > | > | This has nothing to do with const vs non-const but r

Re: const and strict aliasing rules

2006-12-04 Thread Gabriel Dos Reis
Andrew Pinski <[EMAIL PROTECTED]> writes: | > You can work around this by using union's of pointers of both non-const | > and const types, but the reinterpret_cast solution would be more attractive. | > | > Thoughts? | | This has nothing to do with const vs non-const but rather | a and a are tw

Re: const and strict aliasing rules

2006-12-04 Thread Andrew Pinski
> You can work around this by using union's of pointers of both non-const > and const types, but the reinterpret_cast solution would be more attractive. > > Thoughts? This has nothing to do with const vs non-const but rather a and a are two seperate types which are not related in any way. The C+