View Issue Details

IDProjectCategoryView StatusLast Update
0033216CommunityOCCT:Codingpublic2022-11-20 15:38
Reporterwaebbl Assigned Tokgv  
PrioritynormalSeverityminor 
Status newResolutionopen 
Platform64-bitOSGentoo Linux 
Summary0033216: Build warning with -Warray-bounds with v7.7.0
DescriptionVersion 7.7.0 isn't yet selectable from the product version dropdown.

I get a new QT notice after building 7.7.0 with gcc-11.3.1
```
[623/6339] /usr/bin/x86_64-pc-linux-gnu-g++ -DHAVE_FFMPEG -DHAVE_FREEIMAGE -DHAVE_FREETYPE -DHAVE_GLES2_EXT -D
HAVE_Inspector -DHAVE_OPENGL_EXT -DHAVE_QT -DHAVE_RAPIDJSON -DHAVE_TK -DHAVE_VTK -DHAVE_XLIB -DOCC_CONVERT_SIG
NALS -DTKGeomBase_EXPORTS -DVTK_OPENGL2_BACKEND -I/usr/include/freetype2 -I/usr/include/vtk-9.1 -I/var/tmp/por
tage-ondisk/portage/sci-libs/opencascade-7.7.0/work/occt-185d29b_build/include/opencascade -O2 -pipe -march=z
nver2 -frecord-gcc-switches -fstack-check -fPIC -fstack-protector-strong -D_FORTIFY_SOURCE=2 -fexceptions -fPI
C -Wall -Wextra -fPIC -std=gnu++11 -MD -MT src/TKGeomBase/CMakeFiles/TKGeomBase.dir/__/GeomConvert/GeomConvert
_CurveToAnaCurve.cxx.o -MF src/TKGeomBase/CMakeFiles/TKGeomBase.dir/__/GeomConvert/GeomConvert_CurveToAnaCurve
.cxx.o.d -o src/TKGeomBase/CMakeFiles/TKGeomBase.dir/__/GeomConvert/GeomConvert_CurveToAnaCurve.cxx.o -c /var/
tmp/portage-ondisk/portage/sci-libs/opencascade-7.7.0/work/occt-185d29b/src/GeomConvert/GeomConvert_CurveToAna
Curve.cxx
In file included from /var/tmp/portage-ondisk/portage/sci-libs/opencascade-7.7.0/work/occt-185d29b_build/inclu
de/opencascade/Standard_Handle.hxx:1,
                 from /var/tmp/portage-ondisk/portage/sci-libs/opencascade-7.7.0/work/occt-185d29b/src/ElCLib/
ElCLib.hxx:22,
                 from /var/tmp/portage-ondisk/portage/sci-libs/opencascade-7.7.0/work/occt-185d29b_build/inclu
de/opencascade/ElCLib.hxx:1,
                 from /var/tmp/portage-ondisk/portage/sci-libs/opencascade-7.7.0/work/occt-185d29b/src/GeomCon
vert/GeomConvert_CurveToAnaCurve.cxx:18:
/var/tmp/portage-ondisk/portage/sci-libs/opencascade-7.7.0/work/occt-185d29b/src/Standard/Standard_Handle.hxx:
 In static member function ‘static opencascade::handle<Geom_Curve> GeomConvert_CurveToAnaCurve::ComputeCurve(c
onst opencascade::handle<Geom_Curve>&, Standard_Real, Standard_Real, Standard_Real, Standard_Real&, Standard_R
eal&, Standard_Real&, GeomConvert_ConvType, GeomAbs_CurveType)’:
/var/tmp/portage-ondisk/portage/sci-libs/opencascade-7.7.0/work/occt-185d29b/src/Standard/Standard_Handle.hxx:69:57: warning: array subscript -1 is outside array bounds of ‘opencascade::handle<Geom_Curve> [3]’ [-Warray-bounds]
   69 | handle (const handle& theHandle) : entity(theHandle.entity)
      | ~~~~~~~~~~^~~~~~
/var/tmp/portage-ondisk/portage/sci-libs/opencascade-7.7.0/work/occt-185d29b/src/GeomConvert/GeomConvert_CurveToAnaCurve.cxx:647:27: note: while referencing ‘newc3d’
  647 | Handle(Geom_Curve) c3d, newc3d[3];
      | ^~~~~~
```

This might be due to changed gcc policy for the -Warray-bounds warning in gcc-11.
Steps To ReproduceThis is from a build with settings `-DBUILD_DOC_Overview=yes -DBUILD_Inspector=yes -DBUILD_RELEASE_DISABLE_EXCEPTIONS=OFF -DUSE_D3D=NO -DUSE_DRACO=OFF -DUSE_EIGEN=OFF -DUSE_FFMPEG=yes -DUSE_FREEIMAGE=yes -DUSE_FREETYPE=ON -DUSE_GLES2=yes -DUSE_OPENVR=OFF -DUSE_RAPIDJSON=yes -DUSE_TBB=no -DUSE_VTK=yes -DUSE_XLIB=ON -DBUILD_SAMPLE_QT=ON` but also showed on build where doc overview, insepctor, ffmpeg, freeimage, gles2, rapidjson, vtk and samples are not used.
Additional information
and documentation updates
Build log compressed for size. You can use `xzless` to view it.
TagsNo tags attached.
Test case number

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2022-11-20 15:38 waebbl New Issue
2022-11-20 15:38 waebbl Assigned To => kgv