curv3d / curv

a language for making art using mathematics
Apache License 2.0
1.14k stars 73 forks source link

Potentially uninitialized errors in make #12

Closed ncovercash closed 6 years ago

ncovercash commented 6 years ago

I'm getting the following error from make on Ubuntu 18.04 with all dependencies installed.

In file included from /home/noah/curv/./curv/script.h:9:0,
                 from /home/noah/curv/./curv/location.h:8,
                 from /home/noah/curv/./curv/context.h:9,
                 from /home/noah/curv/curv/parser.cc:16:
/home/noah/curv/./curv/shared.h: In function ‘curv::Shared<curv::Phrase> curv::parse_pipeline(curv::Scanner&)’:
/home/noah/curv/./curv/shared.h:57:9: error: ‘<anonymous>’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
         ptr = new(raw) T(std::forward<Args>(args)...);
         ^~~
/home/noah/curv/./curv/shared.h:57:9: error: ‘*((void*)&<anonymous> +4)’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
/home/noah/curv/./curv/shared.h:57:9: error: ‘*((void*)&<anonymous> +8)’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
doug-moen commented 6 years ago

I can't reproduce the problem, but I made a guess about where the problem is, and tried to fix it. Try it now.