error: 'override' does not name a type

Issue #590 closed
Johannes Ring created an issue

The following error occurs when using GCC 4.6.3 on Ubuntu 12.04:

[  1%] Building CXX object dolfin/CMakeFiles/dolfin.dir/ale/HarmonicSmoothing.cpp.o
cd /root/.hashdist/tmp/dolfin-srrc24didmpr-1/_build/dolfin && /usr/bin/c++   -DDOLFIN_LA_INDEX_SIZE=4 -DDOLFIN_SIZE_T=8 -DDOLFIN_VERSION=\"1.7.0dev\" -DHAS_CHOLMOD -DHAS_HDF5 -DHAS_MPI -DHAS_OPENMP -DHAS_PARMETIS -DHAS_PETSC -DHAS_SCOTCH -DHAS_SLEPC -DHAS_UMFPACK -DHAS_VTK -DHAS_ZLIB -DNDEBUG -D_BSD_SOURCE -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -Ddolfin_EXPORTS -pedantic -std=c++0x  -Wno-deprecated   -fopenmp -O3 -DNDEBUG -fPIC -I/root/.hashdist/tmp/dolfin-srrc24didmpr-1/_build -isystem /root/.hashdist/bld/vtk/epjczt5gfrl4/include/vtk-5.10 -I/root/.hashdist/tmp/dolfin-srrc24didmpr-1 -I/root/.hashdist/bld/ffc/kozfm5iocx7o/include -I/root/.hashdist/bld/slepc/p32krb7j7gra/include -isystem /root/.hashdist/bld/suitesparse/fnd3oyibysp3/include/suitesparse -isystem /root/.hashdist/bld/scotch/vm3qczcxeszc/include -I/root/.hashdist/bld/zlib/v6anirfvk2op/include -isystem /root/.hashdist/bld/mpi/gmkx3ftk3tz2/include -isystem /root/.hashdist/bld/eigen/fbpvjm676wjr/include/eigen3 -isystem /root/.hashdist/bld/boost/qhpnxhtx5tl7/include -isystem /root/.hashdist/bld/hdf5/nr5pdm6zckjw/include -isystem /root/.hashdist/bld/petsc/vvqd7cxwcd4j/include -isystem /root/.hashdist/bld/superlu_dist/y3byj5cqyt3n/include -isystem /root/.hashdist/bld/hypre/kh4vd5dptalu/include -isystem /root/.hashdist/bld/parmetis/opckbggomu7w/include -isystem /root/.hashdist/bld/libxml2/mlk7x2dhjiud/include    -o CMakeFiles/dolfin.dir/ale/HarmonicSmoothing.cpp.o -c /root/.hashdist/tmp/dolfin-srrc24didmpr-1/dolfin/ale/HarmonicSmoothing.cpp
In file included from /root/.hashdist/tmp/dolfin-srrc24didmpr-1/dolfin/ale/HarmonicSmoothing.cpp:33:0:
/root/.hashdist/tmp/dolfin-srrc24didmpr-1/dolfin/ale/Poisson1D.h:46:31: error: expected ';' at end of member declaration
/root/.hashdist/tmp/dolfin-srrc24didmpr-1/dolfin/ale/Poisson1D.h:46:33: error: 'override' does not name a type
...

It turns out that the override keyword is not supported in GCC 4.6, but we accept this version in CMakeLists.txt. Should we fix this error or should we bump the minimum required GCC version to 4.7? I guess the latter, since we are no longer testing with GCC 4.6 on the buildbot.

Comments (6)

  1. Martin Sandve Alnæs

    Do we document the required compiler version anywhere? Otherwise there's nothing to do here.

  2. Log in to comment