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

[compile error] looser throw specifier for #4

Closed
dionmagnus opened this issue Nov 8, 2016 · 1 comment
Closed

[compile error] looser throw specifier for #4

dionmagnus opened this issue Nov 8, 2016 · 1 comment

Comments

@dionmagnus
Copy link

I experience a compilation error while trying to build the PHP-CPP lib.
The error is following:
denis@dionmagnus:~/php/PHP-CPP-LEGACY$ make mkdir -p shared/common mkdir -p shared/zend g++ -Wall -c -std=c++11 -fvisibility=hidden -MD -DBUILDING_PHPCPP -Wno-write-strings -gphp-config --includes-fpic -o shared/zend/base.o zend/base.cpp In file included from zend/includes.h:78:0, from zend/base.cpp:8: zend/../include/byval.h:53:13: error: looser throw specifier for ‘virtual Php::ByVal::~ByVal()’ In file included from zend/includes.h:77:0, from zend/base.cpp:8: zend/../include/argument.h:28:13: error: overriding ‘virtual Php::Argument::~Argument() noexcept (true)’ In file included from zend/includes.h:79:0, from zend/base.cpp:8: zend/../include/byref.h:53:13: error: looser throw specifier for ‘virtual Php::ByRef::~ByRef()’ In file included from zend/includes.h:77:0, from zend/base.cpp:8: zend/../include/argument.h:28:13: error: overriding ‘virtual Php::Argument::~Argument() noexcept (true)’ In file included from zend/includes.h:98:0, from zend/base.cpp:8: zend/../include/extension.h:64:13: error: looser throw specifier for ‘virtual Php::Extension::~Extension()’ In file included from zend/includes.h:97:0, from zend/base.cpp:8: zend/../include/namespace.h:97:13: error: overriding ‘virtual Php::Namespace::~Namespace() noexcept (true)’ make: *** [shared/zend/base.o] Ошибка 1
Building environment:
OS: linux Debian 7.11
g++ (Debian 4.7.2-5) 4.7.2
git branch: master

So how can I commit a fix?

Den.

ghost pushed a commit that referenced this issue Dec 9, 2016
…citly default, avoiding a compiler bug in gcc 4.7. Fixes issue #4
@ghost
Copy link

ghost commented Dec 9, 2016

This is very strange. Neither the Php::Argument nor the Php::ByVal classes specify any kind of noexcept. I don't get this message on a newer version of g++. I presume that this older version comes with the bug that an explicitly defaulted destructor defaults to being noexcept qualified.

Since neither of the classes you mention did anything special in the destructor I simply made them all default (which should make their signatures identical - avoiding the compiler bug).

Should you encounter any other issue you can simply clone the repository, make the fix in the clone and send us a pull request.

@ghost ghost closed this as completed Dec 9, 2016
This issue was closed.
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

No branches or pull requests

1 participant