sql-parser icon indicating copy to clipboard operation
sql-parser copied to clipboard

Drop -Werror in mode=debug

Open Allam76 opened this issue 3 years ago • 5 comments

When building with mode = debug it errors out on a warning:

bison_parser.cpp:5516:18: error: ‘void free(void*)’ called on unallocated object ‘yyssa’ [-Werror=free-nonheap-object]

This is a known bug both in bison and gcc. Until it gets fixed, I would assume turning off warnings into errors would be a good thing.

Workaround for others encountering this is simply to delete -Werror from the makefile.

Allam76 avatar Aug 28 '22 07:08 Allam76

Thanks for raising this issue. Do you have a link to the bison issue?

Bouncner avatar Aug 30 '22 07:08 Bouncner

Without having looked at the issue, I am not in favor of temporarily disabling useful flags just for certain unfixed issues. Changes are too good that nobody will revert the flag once the issue is fixed.

Bouncner avatar Aug 30 '22 07:08 Bouncner

Related GCC issue (GCC-11+): https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98753 I would also prefer waiting for Bison/GCC fixes and printing a hint not to use GCC-11/12 for debug builds for now.

dey4ss avatar Aug 30 '22 09:08 dey4ss

Maybe introduce a relaxed flag (see here: https://github.com/hyrise/hyrise/blob/3228b77c02306e4bd15c207f87717af8acd30522/src/CMakeLists.txt#L51) which we recommend when someone uses these compilers with debug mode?

Bouncner avatar Aug 30 '22 09:08 Bouncner

#219 adds a relaxed flag and runs the gcc-12 debug CI job with this flag.

dey4ss avatar Sep 06 '22 12:09 dey4ss