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 with g++ 13: error: expected unqualified-id before '&' token #517

Open
rbro opened this issue Jul 9, 2023 · 0 comments
Open

Comments

@rbro
Copy link
Contributor

rbro commented Jul 9, 2023

When compiling v8js on Fedora 38 which has g++ 13.1.1, I'm getting errors:

/tmp/v8js/v8js_object_export.cc:712:72: error: expected unqualified-id before '&' token
  712 |                                         catch (const std::out_of_range &) {
      |                                                                        ^
/tmp/v8js/v8js_object_export.cc:712:71: error: expected ')' before '&' token
  712 |                                         catch (const std::out_of_range &) {
      |                                               ~                       ^~
      |                                                                       )
/tmp/v8js/v8js_object_export.cc:712:72: error: expected '{' before '&' token
  712 |                                         catch (const std::out_of_range &) {
      |                                                                        ^
/tmp/v8js/v8js_object_export.cc:712:73: error: expected primary-expression before ')' token
  712 |                                         catch (const std::out_of_range &) {
      |                                                                         ^

I'm not very familiar with c++, but I was able to resolve it by adding this to the top of v8js_object_export.cc:

#include <stdexcept>

Is this the right way to fix it?

Thanks for your help.

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