Skip to content

Error building with GCC 11 #8

@kyak

Description

@kyak

After upgrade from GCC 10 to GCC 11, gs-netstream doesn't build anymore. I'm building gs-netstream as part of OpenModelica: https://github.com/OpenModelica/OMCompiler-3rdParty/tree/9efc21c2b91218156bdbcb36eb1059e7a3a55a48/graphstream

Here is the error:

make[4]: Entering directory '/storage/build/openmodelica/src/openmodelica/OMCompiler/3rdParty/graphstream/gs-netstream/c++'
mkdir -p obj
g++ -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection -fno-stack-protector -fPIC -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection -fno-stack-protector -fPIC -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSERTIONS -c src/netstream-storage.cpp -o obj/netstream-storage.o
In file included from src/netstream-storage.cpp:14:
src/netstream-storage.h:44:52: error: ISO C++17 does not allow dynamic exception specifications
   44 |         void checkReadSafe(unsigned int num) const throw(std::invalid_argument);
      |                                                    ^~~~~
src/netstream-storage.h:70:42: error: ISO C++17 does not allow dynamic exception specifications
   70 |         virtual unsigned char readChar() throw(std::invalid_argument);
      |                                          ^~~~~

And a bunch of same errors from other places in netstream-storage.cpp follow.

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