Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove dynamic exception specification #5

Closed

Conversation

kamalesh-babulal
Copy link
Contributor

Tomasz Kłoczko reported that the build fails, while compiling
with GCC 11:

In file included from src/vpdretriever.cpp:25:
./src/libvpd-2/vpdretriever.hpp:62:33: error: ISO C++17 does not allow dynamic exception specifications
62 | throw( VpdException& );
| ^~~~~
./src/libvpd-2/vpdretriever.hpp:74:33: error: ISO C++17 does not allow dynamic exception specifications
74 | throw( VpdException& );
| ^~~~~
src/vpdretriever.cpp:50:37: error: ISO C++17 does not allow dynamic exception specifications
50 | string dbFileName ) throw( VpdException& )
| ^~~~~
src/vpdretriever.cpp:62:39: error: ISO C++17 does not allow dynamic exception specifications
62 | VpdRetriever::VpdRetriever( ) throw( VpdException& )
| ^~~~~
make: *** [Makefile:660: src/vpdretriever.lo] Error 1

As part of
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0003r5.html,
the dynamic exception specification have been removed. Remove the
throw specifier, to specify that the function might throw an exception.

Fixes: #4
Signed-off-by: Kamalesh Babulal kamalesh@linux.vnet.ibm.com

Tomasz Kłoczko reported that the build fails, while compiling
with GCC 11:

In file included from src/vpdretriever.cpp:25:
./src/libvpd-2/vpdretriever.hpp:62:33: error: ISO C++17 does not allow dynamic exception specifications
   62 |                                 throw( VpdException& );
      |                                 ^~~~~
./src/libvpd-2/vpdretriever.hpp:74:33: error: ISO C++17 does not allow dynamic exception specifications
   74 |                                 throw( VpdException& );
      |                                 ^~~~~
src/vpdretriever.cpp:50:37: error: ISO C++17 does not allow dynamic exception specifications
   50 |                 string dbFileName ) throw( VpdException& )
      |                                     ^~~~~
src/vpdretriever.cpp:62:39: error: ISO C++17 does not allow dynamic exception specifications
   62 |         VpdRetriever::VpdRetriever( ) throw( VpdException& )
      |                                       ^~~~~
make: *** [Makefile:660: src/vpdretriever.lo] Error 1

As part of
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0003r5.html,
the dynamic exception specification have been removed. Remove the
throw specifier, to specify that the function might throw an exception.

Fixes: power-ras#4
Signed-off-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>
@kloczek kloczek mentioned this pull request Apr 25, 2021
@hegdevasant
Copy link

Merged to master as 83ccb99.

-Vasant

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2.2.8: build fails
2 participants