[LLVMdev] [brlcad-devel] Clang vs. gcc for building BRL-CAD
Tom Browder
tom.browder at gmail.com
Sat Aug 17 09:34:34 PDT 2013
On Sat, Aug 17, 2013 at 10:50 AM, Tom Browder <tom.browder at gmail.com> wrote:
> Attached is a list of the gcc-4.8.1 warnings from a trunk rev 56916 build
> (made into errors) that, for some reason, don't show in a debug build
> (looks like compile flags may be different but I'm not sure at the
> moment--need to dig into BRL-CAD CMake environment some more).
>
> They look like legit problems but I haven't tried to fix them.
>
>
Now the file is attached!
-Tom
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130817/4b5ae718/attachment.html>
-------------- next part --------------
/disk3/extsrc/brlcad-svn-trunk/src/libfb/if_X24.c: In function 'x24_setup':
/disk3/extsrc/brlcad-svn-trunk/src/libfb/if_X24.c:954:22: error: iteration 219u invokes undefined behavior [-Werror=aggressive-loop-optimizations]
glumtbl[i] = i * 9848226;
^
/disk3/extsrc/brlcad-svn-trunk/src/libfb/if_X24.c:952:3: note: containing loop
for (i = 0; i < 256; i++) {
^
[ 68%] /disk3/extsrc/brlcad-svn-trunk/src/libbn/tests/bn_poly_synthetic_div.c:52:21: error: array subscript is above array bounds [-Werror=array-bounds]
quo[0].dgr = rem[1].dgr = 4;
^
/disk3/extsrc/brlcad-svn-trunk/src/librt/primitives/bspline/nurb_ray.c: In function 'rt_nurb_region_from_srf':
/disk3/extsrc/brlcad-svn-trunk/src/librt/primitives/bspline/nurb_ray.c:303:14: error: array subscript is above array bounds [-Werror=array-bounds]
knot_vec[i+srf->order[0]] = param2;
^
/disk3/extsrc/brlcad-svn-trunk/src/librt/primitives/bspline/nurb_ray.c:310:14: error: array subscript is above array bounds [-Werror=array-bounds]
knot_vec[i+srf->order[1]] = param2;
In file included from /disk3/extsrc/brlcad-svn-trunk/src/librt/primitives/bot/bot_oriented_bbox.cpp:30:0:
/disk3/extsrc/brlcad-svn-trunk/src/other/libgdiam/gdiam.hpp: In function 'void pnt_normalize(gdiam_point)':
/disk3/extsrc/brlcad-svn-trunk/src/other/libgdiam/gdiam.hpp:73:18: warning: comparing floating point with == or != is unsafe [-Wfloat-equal]
if ( len == 0.0 )
^
/disk3/extsrc/brlcad-svn-trunk/src/other/libgdiam/gdiam.hpp: In function 'bool pnt_isEqual(gdiam_point, gdiam_point)':
/disk3/extsrc/brlcad-svn-trunk/src/other/libgdiam/gdiam.hpp:176:32: warning: comparing floating point with == or != is unsafe [-Wfloat-equal]
return ( ( p[ 0 ] == q[ 0 ] )
^
/disk3/extsrc/brlcad-svn-trunk/src/other/libgdiam/gdiam.hpp:177:36: warning: comparing floating point with == or != is unsafe [-Wfloat-equal]
&& ( p[ 1 ] == q[ 1 ] )
^
/disk3/extsrc/brlcad-svn-trunk/src/other/libgdiam/gdiam.hpp:178:36: warning: comparing floating point with == or != is unsafe [-Wfloat-equal]
&& ( p[ 2 ] == q[ 2 ] ) );
^
/disk3/extsrc/brlcad-svn-trunk/src/librt/primitives/bspline/nurb_ray.c: In function 'rt_nurb_region_from_srf':
/disk3/extsrc/brlcad-svn-trunk/src/librt/primitives/bspline/nurb_ray.c:303:14: error: array subscript is above array bounds [-Werror=array-bounds]
knot_vec[i+srf->order[0]] = param2;
^
/disk3/extsrc/brlcad-svn-trunk/src/librt/primitives/bspline/nurb_ray.c:310:14: error: array subscript is above array bounds [-Werror=array-bounds]
knot_vec[i+srf->order[1]] = param2;
^
[ 73%] /disk3/extsrc/brlcad-svn-trunk/src/librt/primitives/bspline/nurb_ray.c: In function 'rt_nurb_intersect':
/disk3/extsrc/brlcad-svn-trunk/src/librt/primitives/bspline/nurb_ray.c:303:14: error: array subscript is above array bounds [-Werror=array-bounds]
knot_vec[i+srf->order[0]] = param2;
^
/disk3/extsrc/brlcad-svn-trunk/src/librt/primitives/bspline/nurb_ray.c:310:14: error: array subscript is above array bounds [-Werror=array-bounds]
knot_vec[i+srf->order[1]] = param2;
/disk3/extsrc/brlcad-svn-trunk/src/librt/primitives/dsp/dsp.c:1184:9: error: 'seg_in.hit_vpriv[0]' may be used uninitialized in this function [-Werror=maybe-uninitialized]
dlog("add_seg %g %g line %d vpriv:%g %g\n", in_hit->hit_dist, out_hit->hit_dist, line, in_hit->hit_vpriv[X], in_hit->hit_vpriv[Y]);
^
/disk3/extsrc/brlcad-svn-trunk/src/librt/primitives/dsp/dsp.c:2468:13: note: 'seg_in.hit_vpriv[0]' was declared here
struct hit seg_in, seg_out;
^
/disk3/extsrc/brlcad-svn-trunk/src/librt/primitives/dsp/dsp.c:1184:9: error: 'seg_in.hit_vpriv[1]' may be used uninitialized in this function [-Werror=maybe-uninitialized]
dlog("add_seg %g %g line %d vpriv:%g %g\n", in_hit->hit_dist, out_hit->hit_dist, line, in_hit->hit_vpriv[X], in_hit->hit_vpriv[Y]);
^
/disk3/extsrc/brlcad-svn-trunk/src/librt/primitives/dsp/dsp.c:2468:13: note: 'seg_in.hit_vpriv[1]' was declared here
struct hit seg_in, seg_out;
^
/disk3/extsrc/brlcad-svn-trunk/src/librt/primitives/dsp/dsp.c:1200:29: error: 'seg_out.hit_vpriv[0]' may be used uninitialized in this function [-Werror=maybe-uninitialized]
seg->seg_out.hit_vpriv[X] = out_hit->hit_vpriv[X];
^
/disk3/extsrc/brlcad-svn-trunk/src/librt/primitives/dsp/dsp.c:2468:21: note: 'seg_out.hit_vpriv[0]' was declared here
struct hit seg_in, seg_out;
^
/disk3/extsrc/brlcad-svn-trunk/src/librt/primitives/dsp/dsp.c:1201:29: error: 'seg_out.hit_vpriv[1]' may be used uninitialized in this function [-Werror=maybe-uninitialized]
seg->seg_out.hit_vpriv[Y] = out_hit->hit_vpriv[Y];
^
/disk3/extsrc/brlcad-svn-trunk/src/librt/primitives/dsp/dsp.c:2468:21: note: 'seg_out.hit_vpriv[1]' was declared here
struct hit seg_in, seg_out;
^
/disk3/extsrc/brlcad-svn-trunk/src/librt/primitives/dsp/dsp.c: In function 'rt_dsp_shot':
/disk3/extsrc/brlcad-svn-trunk/src/librt/primitives/dsp/dsp.c:1184:9: error: 'seg_in.hit_vpriv[0]' may be used uninitialized in this function [-Werror=maybe-uninitialized]
dlog("add_seg %g %g line %d vpriv:%g %g\n", in_hit->hit_dist, out_hit->hit_dist, line, in_hit->hit_vpriv[X], in_hit->hit_vpriv[Y]);
^
/disk3/extsrc/brlcad-svn-trunk/src/librt/primitives/dsp/dsp.c:2468:13: note: 'seg_in.hit_vpriv[0]' was declared here
struct hit seg_in, seg_out;
^
/disk3/extsrc/brlcad-svn-trunk/src/librt/primitives/dsp/dsp.c:1184:9: error: 'seg_in.hit_vpriv[1]' may be used uninitialized in this function [-Werror=maybe-uninitialized]
dlog("add_seg %g %g line %d vpriv:%g %g\n", in_hit->hit_dist, out_hit->hit_dist, line, in_hit->hit_vpriv[X], in_hit->hit_vpriv[Y]);
^
/disk3/extsrc/brlcad-svn-trunk/src/librt/primitives/dsp/dsp.c:2468:13: note: 'seg_in.hit_vpriv[1]' was declared here
struct hit seg_in, seg_out;
^
/disk3/extsrc/brlcad-svn-trunk/src/librt/primitives/dsp/dsp.c:1200:29: error: 'seg_out.hit_vpriv[0]' may be used uninitialized in this function [-Werror=maybe-uninitialized]
seg->seg_out.hit_vpriv[X] = out_hit->hit_vpriv[X];
^
/disk3/extsrc/brlcad-svn-trunk/src/librt/primitives/dsp/dsp.c:2468:21: note: 'seg_out.hit_vpriv[0]' was declared here
struct hit seg_in, seg_out;
^
/disk3/extsrc/brlcad-svn-trunk/src/librt/primitives/dsp/dsp.c:1201:29: error: 'seg_out.hit_vpriv[1]' may be used uninitialized in this function [-Werror=maybe-uninitialized]
seg->seg_out.hit_vpriv[Y] = out_hit->hit_vpriv[Y];
^
/disk3/extsrc/brlcad-svn-trunk/src/librt/primitives/dsp/dsp.c:2468:21: note: 'seg_out.hit_vpriv[1]' was declared here
struct hit seg_in, seg_out;
^
In file included from /disk3/extsrc/brlcad-svn-trunk/src/librt/primitives/nmg/nmg_misc.c:37:0:
/disk3/extsrc/brlcad-svn-trunk/src/librt/primitives/nmg/nmg_misc.c: In function 'nmg_snurb_calc_lu_uv_orient':
/disk3/extsrc/brlcad-svn-trunk/src/librt/primitives/nmg/nmg_misc.c:128:42: error: array subscript is below array bounds [-Werror=array-bounds]
VSCALE(pts[edge_no], crv_pt, crv_pt[coords-1]);
^
/disk3/extsrc/brlcad-svn-trunk/include/vmath.h:993:21: note: in definition of macro 'VSCALE'
(a)[X] = (b)[X] * (c); \
^
/disk3/extsrc/brlcad-svn-trunk/src/librt/primitives/nmg/nmg_misc.c:128:42: error: array subscript is below array bounds [-Werror=array-bounds]
VSCALE(pts[edge_no], crv_pt, crv_pt[coords-1]);
^
/disk3/extsrc/brlcad-svn-trunk/include/vmath.h:994:21: note: in definition of macro 'VSCALE'
(a)[Y] = (b)[Y] * (c); \
^
/disk3/extsrc/brlcad-svn-trunk/src/librt/primitives/nmg/nmg_misc.c:128:42: error: array subscript is below array bounds [-Werror=array-bounds]
VSCALE(pts[edge_no], crv_pt, crv_pt[coords-1]);
^
/disk3/extsrc/brlcad-svn-trunk/include/vmath.h:995:21: note: in definition of macro 'VSCALE'
(a)[Z] = (b)[Z] * (c); \
/disk3/extsrc/brlcad-svn-trunk/src/librt/primitives/nmg/nmg_rt_isect.c: In function 'isect_ray_snurb_face':
/disk3/extsrc/brlcad-svn-trunk/src/librt/primitives/nmg/nmg_rt_isect.c:1867:41: error: array subscript is above array bounds [-Werror=array-bounds]
ctl_pt[i][j] = ctl_pt[i][j]/ctl_pt[i][coords-1];
^
/disk3/extsrc/brlcad-svn-trunk/src/librt/primitives/nmg/nmg_rt_isect.c:1867:41: error: array subscript is above array bounds [-Werror=array-bounds]
/disk3/extsrc/brlcad-svn-trunk/src/librt/primitives/nmg/nmg_rt_isect.c:1867:41: error: array subscript is above array bounds [-Werror=array-bounds]
/disk3/extsrc/brlcad-svn-trunk/src/librt/primitives/nmg/nmg_rt_isect.c:1867:41: error: array subscript is above array bounds [-Werror=array-bounds]
/disk3/extsrc/brlcad-svn-trunk/src/librt/primitives/nmg/nmg_rt_isect.c:1867:41: error: array subscript is above array bounds [-Werror=array-bounds]
/disk3/extsrc/brlcad-svn-trunk/src/librt/primitives/nmg/nmg_rt_isect.c:1867:41: error: array subscript is above array bounds [-Werror=array-bounds]
/disk3/extsrc/brlcad-svn-trunk/src/librt/primitives/nmg/nmg_rt_isect.c:1867:41: error: array subscript is above array bounds [-Werror=array-bounds]
/disk3/extsrc/brlcad-svn-trunk/src/librt/primitives/nmg/nmg_rt_isect.c:1867:41: error: array subscript is above array bounds [-Werror=array-bounds]
/disk3/extsrc/brlcad-svn-trunk/src/librt/primitives/nmg/nmg_rt_isect.c:1867:41: error: array subscript is above array bounds [-Werror=array-bounds]
More information about the llvm-dev
mailing list