Skip to content

"control reaches end of non-void function" warning from GCC #149

@iv-m

Description

@iv-m

boost 1.83.0 does not build with gcc 13.2 because compilation of libs/mpi/src/environment.cpp fails with the following diagnostics:

    "g++"  -fPIC -m64 -pthread -fvisibility=default -pipe -frecord-gcc-switches -Wall -g -O2 -flto=auto -ffat-lto-objects -fno-strict-aliasing  -DBOOST_ALL_NO_LIB=1 -DBOOST_MPI_DYN_LINK=1 -DBOOST_MPI_SOURCE=1 -DNDEBUG   -I"." -I"/usr/lib64/
openmpi/include"  -c -o "bin.v2/libs/mpi/build/gcc-13/release/local-visibility-global/optimization-off/pch-off/threading-multi/visibility-hidden/environment.o" "libs/mpi/src/environment.cpp"                                                  
                                                                                                                                                                                                                                                
libs/mpi/src/environment.cpp: In function 'int boost::mpi::detail::level2int(boost::mpi::threading::level)':                                                                                                                                    
libs/mpi/src/environment.cpp:35:23: error: control reaches end of non-void function [-Werror=return-type]                                                                                                                                       
   35 |     environment::abort(70); // EX_SOFTWARE                                                                                                                                                                                              
      |     ~~~~~~~~~~~~~~~~~~^~~~                                                                                                                                                                                                              
libs/mpi/src/environment.cpp: In function 'boost::mpi::threading::level boost::mpi::detail::int2level(int)':                                                                                                                                    
libs/mpi/src/environment.cpp:53:23: error: control reaches end of non-void function [-Werror=return-type]                                                                                                                                       
   53 |     environment::abort(70); // EX_SOFTWARE                                                                                                                                                                                              
      |     ~~~~~~~~~~~~~~~~~~^~~~                                                                                                                                                                                                              
cc1plus: some warnings being treated as errors                                                                                                                                                                                                  

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions