Skip to content

[jsartoolkitNFT] Removing throw warnings while compiling libar.bc #11

Description

@kalwalt

While compiling jsartoolkitNFT we recieve these warnings:

In file included from /mnt/c/Users/perda/OneDrive/Documenti/kalwalt-github/webarkit-jsfeat-cpp/emscripten/WebARKitLib/lib/SRC/KPM/FreakMatcher/facade/visual_database_facade.cpp:37:
In file included from /mnt/c/Users/perda/OneDrive/Documenti/kalwalt-github/webarkit-jsfeat-cpp/emscripten/WebARKitLib/lib/SRC/KPM/FreakMatcher/matchers/visual_database-inline.h:44:
/mnt/c/Users/perda/OneDrive/Documenti/kalwalt-github/webarkit-jsfeat-cpp/emscripten/WebARKitLib/lib/SRC/KPM/FreakMatcher/matchers/visual_database.h:83:14: warning: dynamic exception specifications with types are currently ignored in wasm [-Wwasm-exception-spec]
        void addImage(const Image& image, id_t id) throw(Exception);
             ^                                     ~~~~~~~~~~~~~~~~
/mnt/c/Users/perda/OneDrive/Documenti/kalwalt-github/webarkit-jsfeat-cpp/emscripten/WebARKitLib/lib/SRC/KPM/FreakMatcher/matchers/visual_database.h:88:14: warning: dynamic exception specifications with types are currently ignored in wasm [-Wwasm-exception-spec]
        void addImage(const GaussianScaleSpacePyramid* pyramid, id_t id) throw(Exception);
             ^                                                           ~~~~~~~~~~~~~~~~
/mnt/c/Users/perda/OneDrive/Documenti/kalwalt-github/webarkit-jsfeat-cpp/emscripten/WebARKitLib/lib/SRC/KPM/FreakMatcher/matchers/visual_database.h:93:14: warning: dynamic exception specifications with types are currently ignored in wasm [-Wwasm-exception-spec]
        void addKeyframe(keyframe_ptr_t keyframe , id_t id) throw(Exception);
             ^                                              ~~~~~~~~~~~~~~~~
/mnt/c/Users/perda/OneDrive/Documenti/kalwalt-github/webarkit-jsfeat-cpp/emscripten/WebARKitLib/lib/SRC/KPM/FreakMatcher/matchers/visual_database.h:98:14: warning: dynamic exception specifications with types are currently ignored in wasm [-Wwasm-exception-spec]
        bool query(const Image& image) throw(Exception);
             ^                         ~~~~~~~~~~~~~~~~
/mnt/c/Users/perda/OneDrive/Documenti/kalwalt-github/webarkit-jsfeat-cpp/emscripten/WebARKitLib/lib/SRC/KPM/FreakMatcher/matchers/visual_database.h:103:14: warning: dynamic exception specifications with types are currently ignored in wasm [-Wwasm-exception-spec]
        bool query(const GaussianScaleSpacePyramid* pyramid) throw(Exception);
             ^                                               ~~~~~~~~~~~~~~~~
/mnt/c/Users/perda/OneDrive/Documenti/kalwalt-github/webarkit-jsfeat-cpp/emscripten/WebARKitLib/lib/SRC/KPM/FreakMatcher/matchers/visual_database.h:104:14: warning: dynamic exception specifications with types are currently ignored in wasm [-Wwasm-exception-spec]
        bool query(const keyframe_t* query_keyframe) throw(Exception);
             ^                                       ~~~~~~~~~~~~~~~~
6 warnings generated.

The code will be compiled with emsdk 3.1.20 but warnings will be converted as errors with emsdk 3.1.26, this because emscripten will use c++ 17 by default, dynamic throwing is not allowed anymore.
We need to remove that lines, and/or if we have time and better throw exceptions. But this will require more time to develop.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    C/C++ codeconcerning the C/C++ code design and improvementsEmscriptenbugSomething isn't workingenhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions