New error on stan develop during windows unit tests

Anyone recognize this? We had a week or two with the windows test server down and I think a new error might have crept in:

In file included from src/test/unit/lang/reject/reject_func_call_transformed_data_test.cpp:2:0:
src/test/test-models/good/lang/reject_func_call_transformed_data.hpp: In function 'void reject_func_call_transformed_data_model_namespace::foo(const T0__&, std::ostream*)':
src/test/test-models/good/lang/reject_func_call_transformed_data.hpp:26:28: error: typedef 'fun_return_scalar_t__' locally defined but not used [-Werror=unused-local-typedefs]
     typedef fun_scalar_t__ fun_return_scalar_t__;

See more here: http://d1m1s1b1.stat.columbia.edu:8080/job/Stan%20Windows%20-%20Tests%20-%20Unit/393/console

tagging @Bob_Carpenter and @mitzimorris since this seems to be in the lang tests and they might know this error at a glance.

Thanks!

My guess is that it has to do with the new toolchain. For our tests on
Jenkins, we’ve been upgrading warnings to errors (I believe) so we make
sure to tackle them. We may have to alter either the makefile's compiler
options or adjust them in Jenkins if that’s indeed a warning that’s
stemming from the generated C++ code from a Stan program.

I was thinking maybe it wasn’t the new toolchain because it seems to have passed on Travis: https://travis-ci.org/stan-dev/stan/builds/226197247

But I don’t see any log files there for this build (where I might see e.g. the version number), which is weird, but I expect the travis version of gcc to be 4.9.3 or greater?

I think you’re right - just pulled down the latest GCC and I get the same warnings. I also get some additional warnings for cvodes about misleading indentation, but apparently those warnings are new in gcc 6 so we have a long time before we get there :P

Do we want to fix the generated code or make warnings not be errors? @Bob_Carpenter might know how difficult the former is.

I’ll create an issue and pull request to remove this problem. I thought I’d already responded, but we have so many channels going at once these days, I might have posted it elsewhere.

I take it back. That’s all auto-generated code and it’d be a major pain to fix it. Can we just turn that message off?

Yeah, I will try adding -Wno-unused-local-typedefs to the makefile to silence these.

[edit] https://github.com/stan-dev/stan/pull/2295