[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: CVS update: subversion/subversion/libsvn_subr svn_string.c

From: Bob Miller <kbob_at_jogger-egg.com>
Date: 2000-10-14 19:55:04 CEST

Bill Tutt wrote:

> Casts are indeed nasty things, and casts to (void *) are especially nasty,
> especially if you want SVN to compile safely under
> -fstrict-aliasing in gcc.
>
> See http://gcc.gnu.org/onlinedocs/gcc_2.html#SEC11 and the commentary on
> -fstrict-aliasing.

I've read it, but I don't understand. Under what machine architectures
or runtime models would the pointer break as its type changes?

The example from the gcc page was:

        union a_union {
            int i;
            double d;
        };
        int f() {
            a_union t;
            int* ip;
            t.d = 3.0;
            ip = &t.i;
            return *ip;
        }

-- 
                                        K<bob>
kbob_at_jogger-egg.com, http://www.jogger-egg.com/
Received on Sat Oct 21 14:36:11 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.