News:

--

Main Menu

C++17 errors

Started by hobbes1069, February 04, 2021, 03:22:54 PM

Previous topic - Next topic

hobbes1069

Now that newer version of gcc default to c++17 avidemux fails to build with a bunch of errors like:

/builddir/build/BUILD/avidemux_2.7.6/avidemux_core/ADM_coreUtils/src/Source/JSONNode.h: At global scope:
/builddir/build/BUILD/avidemux_2.7.6/avidemux_core/ADM_coreUtils/src/Source/JSONDefs/GNU_C.h:58:28: error: ISO C++17 does not allow dynamic exception specifications
   58 |     #define json_throws(x) throw(x)
      |                            ^~~~~
/builddir/build/BUILD/avidemux_2.7.6/avidemux_core/ADM_coreUtils/src/Source/JSONNode.h:179:37: note: in expansion of macro 'json_throws'
  179 |     JSONNode & at(json_index_t pos) json_throws(std::out_of_range);
      |                                     ^~~~~~~~~~~
/builddir/build/BUILD/avidemux_2.7.6/avidemux_core/ADM_coreUtils/src/Source/JSONDefs/GNU_C.h:58:28: error: ISO C++17 does not allow dynamic exception specifications
   58 |     #define json_throws(x) throw(x)
      |                            ^~~~~
/builddir/build/BUILD/avidemux_2.7.6/avidemux_core/ADM_coreUtils/src/Source/JSONNode.h:180:49: note: in expansion of macro 'json_throws'
  180 |     const JSONNode & at(json_index_t pos) const json_throws(std::out_of_range);
      |                                                 ^~~~~~~~~~~
/builddir/build/BUILD/avidemux_2.7.6/avidemux_core/ADM_coreUtils/src/Source/JSONDefs/GNU_C.h:58:28: error: ISO C++17 does not allow dynamic exception specifications
   58 |     #define json_throws(x) throw(x)
      |                            ^~~~~
/builddir/build/BUILD/avidemux_2.7.6/avidemux_core/ADM_coreUtils/src/Source/JSONNode.h:185:47: note: in expansion of macro 'json_throws'
  185 |     JSONNode & at(const json_string & name_t) json_throws(std::out_of_range);
      |                                               ^~~~~~~~~~~
/builddir/build/BUILD/avidemux_2.7.6/avidemux_core/ADM_coreUtils/src/Source/JSONDefs/GNU_C.h:58:28: error: ISO C++17 does not allow dynamic exception specifications
   58 |     #define json_throws(x) throw(x)
      |                            ^~~~~
/builddir/build/BUILD/avidemux_2.7.6/avidemux_core/ADM_coreUtils/src/Source/JSONNode.h:186:59: note: in expansion of macro 'json_throws'
  186 |     const JSONNode & at(const json_string & name_t) const json_throws(std::out_of_range);
      |                                                           ^~~~~~~~~~~
/builddir/build/BUILD/avidemux_2.7.6/avidemux_core/ADM_coreUtils/src/Source/JSONDefs/GNU_C.h:58:28: error: ISO C++17 does not allow dynamic exception specifications
   58 |     #define json_throws(x) throw(x)
      |                            ^~~~~
/builddir/build/BUILD/avidemux_2.7.6/avidemux_core/ADM_coreUtils/src/Source/JSONNode.h:188:61: note: in expansion of macro 'json_throws'
  188 |            JSONNode & at_nocase(const json_string & name_t) json_throws(std::out_of_range);
      |                                                             ^~~~~~~~~~~
/builddir/build/BUILD/avidemux_2.7.6/avidemux_core/ADM_coreUtils/src/Source/JSONDefs/GNU_C.h:58:28: error: ISO C++17 does not allow dynamic exception specifications
   58 |     #define json_throws(x) throw(x)
      |                            ^~~~~

I have forced the RPM Fusion package to use C++14 for now but would like to get it fixed.

Thanks,
Richard

eumagga0x2a

Thanks, looking into it.

eumagga0x2a

Should be fixed now, with a followup added to make friends with Apple clang which else seems to default to C++98.

BTW, 2.7.7 is expected soon, it may be worth waiting a few weeks for the release rather than adding patches.

hobbes1069

I can confirm that fixed it for me. Looking forward to 2.7.7.

Thanks,
Richard