Comment # 157
on bug 8416
from beroset@mindspring.com
(In reply to comment #149)
> (In reply to comment #147)
> > (In reply to comment #145)
> > > (In reply to comment #78)
> > > > Created attachment 10296 [details]
> > > > patch to remove C++ incompatibilities from uat_new calls from several files
> > > >
> > > > the fifth argument to uat_new is "void** data_ptr" but many files cast it to
> > > > "void *" on invocation. This patch changes those files to use a "void **"
> > > > cast to remove a C++ incompatibility.
> > >
> > > With this patch I cannot compile anymore with gcc (GCC) 4.1.3 20080704
> > > (prerelease) (Debian 4.1.2-25). I get the following warning:
> > > dereferencing type-punned pointer will break strict-aliasing rules
> > >
> > > Maybe that's why the initial code was using void* instead of void**.
> > >
> > > I'm running out of idea on how to nicely handle this. Replacing (void**) by
> > > (void**)(void*) does work but is really ugly.
> > > Any thought?
> >
> > Which file or files does it complain about?
>
> All the files using uat_new (because of this fifth parameter).
I'm using Fedora 17 with gcc version 4.7.2 20120921 (Red Hat 4.7.2-2) (GCC) and
don't get any error. I'm checking now to see what changed from 4.1.3 to 4.7.2
that might affect this.
You are receiving this mail because:
- You are watching all bug changes.