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

C++ compiling error in gc #5898

Open
3epifaniusz opened this issue Jan 3, 2023 · 1 comment
Open

C++ compiling error in gc #5898

3epifaniusz opened this issue Jan 3, 2023 · 1 comment

Comments

@3epifaniusz
Copy link

3epifaniusz commented Jan 3, 2023

g++ -Wall -pedantic-errors -I ~/mruby/include/ programik.c -o programik ~/mruby/build/minimal/lib/libmruby.a -lm
In file included from /home/user/mruby/include/mruby.h:118,
                 from zero.c:1:
/home/user/mruby/include/mruby/gc.h:51:9: error: ISO C++ forbids flexible array member ‘objects’ [-Wpedantic]
   51 |   void *objects[];
      |         ^~~~~~~

g++ (GCC) 12.2.1 20221121 (Red Hat 12.2.1-4) on fedora 37
mruby 3.1.0

@dearblue
Copy link
Contributor

dearblue commented Jan 3, 2023

A similar error was not identified in the development version.
ref. https://github.com/mruby/mruby/pull/5596/files#diff-4102f89ac26fabdcfc82d2d877a70cab4e56814b6adfb2040934635870e7adb4

Please try the latest development version or wait for mruby 3.2, which is expected in the near future.

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

2 participants