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 on Ubuntu lunar. Array subscript 0 is outside array bounds of ‘void [0]’ in ptxd.h #227

Open
Mobi97213 opened this issue May 21, 2023 · 2 comments

Comments

@Mobi97213
Copy link

Compile Error on Ubuntu lunar. Array subscript 0 is outside array bounds of ‘void [0]’. ??? not sure what to do next...
`
In file included from /home/rick/bin/micmac/include/StdAfx.h:73:
In member function ‘Pt2d& Pt2d::operator=(const Pt2d&) [with Type = double]’,
inlined from ‘void ElFifo::incr_capa() [with Type = Pt2d]’ at /home/rick/bin/micmac/include/ext_stl/fifo.h:202:28,
inlined from ‘void ElFifo::push_back(const Type&) [with Type = Pt2d]’ at /home/rick/bin/micmac/include/ext_stl/fifo.h:367:41,
inlined from ‘void ElFifo::pushlast(const Type&) [with Type = Pt2d]’ at /home/rick/bin/micmac/include/ext_stl/fifo.h:370:50,
inlined from ‘void PtsOfSquare(ElFifo<Pt2d >&, Pt2dr, Pt2dr)’ at /home/rick/bin/micmac/src/geom2d/basic.cpp:54:17:
/home/rick/bin/micmac/include/general/ptxd.h:278:15: error: array subscript 0 is outside array bounds of ‘void [0]’ [-Werror=array-bounds]
278 | x = p2.x;

`

@rekitheduck
Copy link

Having the same exact issue. I'm also on Lunar Lobster - Ubuntu 23.04

@rekitheduck
Copy link

After some digging, the problem appears to be that the flag to treat all warnings as errors has been enabled, but warnings haven't been fixed first. So by default, the code simply doesn't build.

I was able to fix it by specifying -DWERROR=0 as a CMake option

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