From fece31537bca6858e3c6fe45dcc322c8c4355baa Mon Sep 17 00:00:00 2001 From: Brian Ward Date: Mon, 6 May 2024 16:48:48 -0400 Subject: [PATCH 1/2] Use pragmas to disable unused variable warnings in generated C++ --- src/stan_math_backend/Cpp.ml | 37 +- src/stan_math_backend/Lower_functions.ml | 25 +- src/stan_math_backend/Lower_program.ml | 80 +- .../cli-args/allow-undefined/cpp.expected | 55 +- .../allow-undefined/standalone-cpp.expected | 15 +- .../filename-in-msg/filename_good.expected | 49 +- test/integration/good/code-gen/cl.expected | 49 +- .../code-gen/complex_numbers/cpp.expected | 457 +-- test/integration/good/code-gen/cpp.expected | 2593 ++--------------- .../good/code-gen/expressions/cpp.expected | 171 +- test/integration/good/code-gen/lir.expected | 244 +- .../good/code-gen/ode/cpp.expected | 128 +- .../good/code-gen/opencl/cpp.expected | 98 +- .../good/code-gen/profiling/cpp.expected | 49 +- .../standalone_functions/cpp.expected | 157 +- .../good/compiler-optimizations/cpp.expected | 2333 +++------------ .../compiler-optimizations/cppO0.expected | 2333 +++------------ .../compiler-optimizations/cppO1.expected | 2333 +++------------ .../mem_patterns/cpp.expected | 636 +--- test/integration/good/tuples/cpp.expected | 1572 ++-------- 20 files changed, 2125 insertions(+), 11289 deletions(-) diff --git a/src/stan_math_backend/Cpp.ml b/src/stan_math_backend/Cpp.ml index 25453b567..6003f5e17 100644 --- a/src/stan_math_backend/Cpp.ml +++ b/src/stan_math_backend/Cpp.ml @@ -261,10 +261,6 @@ module Stmts = struct For (init, stop, incr, body) let if_block cond stmts = IfElse (cond, block stmts, None) - - (** Suppress warnings for a variable which may not be used. *) - let unused s = - [Comment "suppress unused var warning"; Expression (Cast (Void, Var s))] end module Decls = struct @@ -274,13 +270,11 @@ module Decls = struct VariableDefn (make_variable_defn ~type_:Int ~name:"current_statement__" ~init:(Assignment (Literal "0")) ()) - :: Stmts.unused "current_statement__" let dummy_var = VariableDefn (make_variable_defn ~type_:Types.local_scalar ~name:"DUMMY_VAR__" ~init:(Construction [Exprs.quiet_NaN]) ()) - :: Stmts.unused "DUMMY_VAR__" let serializer_in = VariableDefn @@ -341,6 +335,7 @@ type directive = | Include of string | IfNDef of string * defn list | MacroApply of string * string list + | Pragma of string (** The Stan model class always has a non-default constructor and destructor *) @@ -367,18 +362,23 @@ and defn = | Preprocessor of directive [@@deriving sexp] -(* can't be derivided since it is simultaneously declared with non-records *) -let make_class_defn ~name ~public_base ?(final = true) ~private_members - ~public_members ~constructor ?(destructor_body = []) () = - { class_name= name - ; public_base - ; final - ; private_members - ; public_members - ; constructor - ; destructor_body } - -let make_struct_defn ~param ~name ~body () = {param; struct_name= name; body} +module Defn = struct + (* can't be derived since it is simultaneously declared with non-records *) + let make_class ~name ~public_base ?(final = true) ~private_members + ~public_members ~constructor ?(destructor_body = []) () = + { class_name= name + ; public_base + ; final + ; private_members + ; public_members + ; constructor + ; destructor_body } + + let make_struct ~param ~name ~body () = {param; struct_name= name; body} + + (** Some code relies on specific compiler pragmas *) + let if_not_MSVC defns = Preprocessor (IfNDef ("_MSC_VER", defns)) +end (** Much like in C++, we define a translation unit as a list of definitions *) type program = defn list [@@deriving sexp] @@ -631,6 +631,7 @@ module Printing = struct pf ppf "@[#ifndef %s@,%a@,#endif" name (list ~sep:cut pp_defn) defns | MacroApply (name, args) -> pf ppf "@[%s(%a)@]" name (list ~sep:comma string) args + | Pragma s -> pf ppf "@[#pragma %s@]" s and pp_class_defn ppf { class_name diff --git a/src/stan_math_backend/Lower_functions.ml b/src/stan_math_backend/Lower_functions.ml index 50945b9b3..7c2eab325 100644 --- a/src/stan_math_backend/Lower_functions.ml +++ b/src/stan_math_backend/Lower_functions.ml @@ -229,13 +229,12 @@ let lower_fun_body fdargs fdsuffix fdbody = match fdsuffix with | Fun_kind.FnLpdf _ | FnTarget -> [] | FnPlain | FnRng -> - VariableDefn - (make_variable_defn ~static:true ~constexpr:true ~type_:Types.bool - ~name:"propto__" ~init:(Assignment (Literal "true")) ()) - :: Stmts.unused "propto__" in + [ VariableDefn + (make_variable_defn ~static:true ~constexpr:true ~type_:Types.bool + ~name:"propto__" ~init:(Assignment (Literal "true")) ()) ] in let body = lower_statement fdbody in - ((local_scalar :: Decls.current_statement) @ to_refs) - @ propto @ Decls.dummy_var @ Stmts.rethrow_located body + (local_scalar :: Decls.current_statement :: to_refs) + @ propto @ [Decls.dummy_var] @ Stmts.rethrow_located body let mk_extra_args templates args = List.map @@ -325,7 +324,7 @@ let lower_fun_def (functors : Lower_expr.variadic list) make_fun_defn ~templates_init:([arg_templates], true) ~name:"operator()" ~return_type:(lower_returntype fdargs fdrt) ~args:cpp_args ~cv_qualifiers:[Const] ~body:defn_body () in - make_struct_defn ~param:struct_template ~name:functor_name + Defn.make_struct ~param:struct_template ~name:functor_name ~body:[FunDef functor_decl] () in (fd, functors |> List.map ~f:register_functor) @@ -461,16 +460,10 @@ module Testing = struct using local_scalar_t__ = stan::promote_args_t, stan::base_type_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& x = stan::math::to_ref(x_arg__); const auto& y = stan::math::to_ref(y_arg__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { return stan::math::add(x, 1); } catch (const std::exception& e) { @@ -534,17 +527,11 @@ module Testing = struct stan::base_type_t, stan::base_type_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& x = stan::math::to_ref(x_arg__); const auto& y = stan::math::to_ref(y_arg__); const auto& z = stan::math::to_ref(z_arg__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { return stan::math::add(x, 1); } catch (const std::exception& e) { diff --git a/src/stan_math_backend/Lower_program.ml b/src/stan_math_backend/Lower_program.ml index 7429fa256..cb73ae59d 100644 --- a/src/stan_math_backend/Lower_program.ml +++ b/src/stan_math_backend/Lower_program.ml @@ -20,18 +20,28 @@ let get_unconstrained_param_st lst = @param fname Name of the function. *) let gen_function__ prog_name fname = - [ VariableDefn - (make_variable_defn ~static:true ~constexpr:true - ~type_:(Const (Pointer (TypeLiteral "char"))) ~name:"function__" - ~init: - (Assignment - (Exprs.literal_string (prog_name ^ "_namespace::" ^ fname))) - ()) ] - @ Stmts.unused "function__" + VariableDefn + (make_variable_defn ~static:true ~constexpr:true + ~type_:(Const (Pointer (TypeLiteral "char"))) ~name:"function__" + ~init: + (Assignment (Exprs.literal_string (prog_name ^ "_namespace::" ^ fname))) + ()) let version = GlobalComment "Code generated by %%NAME%% %%VERSION%%" let includes = Preprocessor (Include "stan/model/model_header.hpp") +let prevent_unused = + Defn.if_not_MSVC + [ GlobalComment + "Disable warnings for unused variables in our generated code." + ; Preprocessor (Pragma "GCC diagnostic push") + ; Preprocessor + (Pragma {|GCC diagnostic ignored "-Wunused-but-set-variable"|}) + ; Preprocessor (Pragma {|GCC diagnostic ignored "-Wunused-variable"|}) ] + +let diagnostics_pop = + [Defn.if_not_MSVC [Preprocessor (Pragma "GCC diagnostic pop")]] + (** Generate the private members of the model class This accounts for types that can be moved to OpenCL. @@ -156,18 +166,14 @@ let lower_constructor ; (TypeLiteral "unsigned int", "random_seed__ = 0") ; (Pointer (TypeLiteral "std::ostream"), "pstream__ = nullptr") ] in let preamble = - Decls.current_statement - @ [ Using ("local_scalar_t__", Some Double) - ; VariableDefn - (make_variable_defn ~type_:(TypeLiteral "auto") ~name:"base_rng__" - ~init: - (Assignment - (Exprs.fun_call "stan::services::util::create_rng" - [Var "random_seed__"; Literal "0"])) - ()) ] - @ Stmts.unused "base_rng__" - @ gen_function__ prog_name prog_name - @ Decls.dummy_var in + [ Decls.current_statement; Using ("local_scalar_t__", Some Double) + ; VariableDefn + (make_variable_defn ~type_:(TypeLiteral "auto") ~name:"base_rng__" + ~init: + (Assignment + (Exprs.fun_call "stan::services::util::create_rng" + [Var "random_seed__"; Literal "0"])) + ()); gen_function__ prog_name prog_name; Decls.dummy_var ] in let data_idents = List.map ~f:fst3 input_vars |> String.Set.of_list in let lower_data (Stmt.Fixed.{pattern; meta} as s) = match pattern with @@ -217,9 +223,8 @@ let gen_log_prob Program.{prog_name; log_prob; reverse_mode_log_prob; _} = ; VariableDefn (make_variable_defn ~type_:t__ ~name:"lp__" ~init:(Construction [Literal "0.0"]) ()); Decls.lp_accum t__ - ; Decls.serializer_in ] - @ Decls.current_statement @ Decls.dummy_var - @ gen_function__ prog_name "log_prob" in + ; Decls.serializer_in; Decls.current_statement; Decls.dummy_var + ; gen_function__ prog_name "log_prob" ] in let outro = let open Expression_syntax in let lp_accum__ = Var "lp_accum__" in @@ -266,19 +271,15 @@ let gen_write_array {Program.prog_name; generate_quantities; _} = ; Decls.serializer_out ; VariableDefn (make_variable_defn ~static:true ~constexpr:true ~type_:Types.bool - ~name:"propto__" ~init:(Assignment (Literal "true")) ()) ] - @ Stmts.unused "propto__" - @ VariableDefn + ~name:"propto__" ~init:(Assignment (Literal "true")) ()) + ; VariableDefn (make_variable_defn ~type_:Double ~name:"lp__" - ~init:(Assignment (Literal "0.0")) ()) - :: Stmts.unused "lp__" - @ Decls.current_statement - @ (Decls.lp_accum Double :: Decls.dummy_var) - @ VariableDefn + ~init:(Assignment (Literal "0.0")) ()); Decls.current_statement + ; Decls.lp_accum Double; Decls.dummy_var + ; VariableDefn (make_variable_defn ~constexpr:true ~type_:Types.bool ~name:"jacobian__" ~init:(Assignment (Literal "false")) ()) - :: Stmts.unused "jacobian__" - @ gen_function__ prog_name "write_array" in + ; gen_function__ prog_name "write_array" ] in FunDef (make_fun_defn ~templates_init:([templates], true) ~inline:true ~return_type:Void ~name:"write_array_impl" ~args @@ -294,9 +295,8 @@ let gen_transform_inits_impl {Program.transform_inits; output_vars; _} = ; (Ref (TemplateType "VecVar"), "vars__") ; (Pointer (TypeLiteral "std::ostream"), "pstream__ = nullptr") ] in let intro = - Using ("local_scalar_t__", Some Double) - :: Decls.serializer_out :: Decls.current_statement - @ Decls.dummy_var in + [ Using ("local_scalar_t__", Some Double); Decls.serializer_out + ; Decls.current_statement; Decls.dummy_var ] in let validate_params ( (name : string) , (loc : int) @@ -330,8 +330,7 @@ let gen_unconstrain_array_impl {Program.unconstrain_array; _} = ; (Pointer (TypeLiteral "std::ostream"), "pstream__ = nullptr") ] in let intro = [ Using ("local_scalar_t__", Some Double); Decls.serializer_in - ; Decls.serializer_out ] - @ Decls.current_statement @ Decls.dummy_var in + ; Decls.serializer_out; Decls.current_statement; Decls.dummy_var ] in FunDef (make_fun_defn ~templates_init:([templates], true) ~inline:true ~return_type:Void ~name:"unconstrain_array_impl" ~args @@ -830,7 +829,7 @@ let lower_model ({Program.prog_name; _} as p) = let public_members = model_public_basics prog_name @ lower_model_public p in let constructor = lower_constructor p in Class - (make_class_defn ~name:prog_name ~final:true + (Defn.make_class ~name:prog_name ~final:true ~public_base:(TypeTrait ("model_base_crtp", [TypeLiteral prog_name])) ~private_members ~public_members ~constructor ()) @@ -893,7 +892,8 @@ let lower_program ?printed_filename (p : Program.Typed.t) : Cpp.program = new_model_boilerplate p.prog_name @ Numbering.register_map_rect_functors model_namespace_str map_rect_calls in - [version; includes; model_namespace] @ global_fns + [version; includes; prevent_unused; model_namespace] + @ global_fns @ diagnostics_pop module Testing = struct open Fmt diff --git a/test/integration/cli-args/allow-undefined/cpp.expected b/test/integration/cli-args/allow-undefined/cpp.expected index f15821ce0..f93ecbd28 100644 --- a/test/integration/cli-args/allow-undefined/cpp.expected +++ b/test/integration/cli-args/allow-undefined/cpp.expected @@ -1,6 +1,12 @@ $ ../../../../../install/default/bin/stanc --allow-undefined --print-cpp external.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace external_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -31,14 +37,8 @@ internal_fun(const std::vector>& a, const std::vector>& d, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; return stan::math::sum( @@ -59,19 +59,11 @@ class external_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "external_model_namespace::external_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; num_params_r__ = 0U; } inline std::string model_name() const final { @@ -95,15 +87,9 @@ class external_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "external_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; lp_accum__.add(lp__); return lp_accum__.sum(); } @@ -121,15 +107,9 @@ class external_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "external_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; lp_accum__.add(lp__); return lp_accum__.sum(); } @@ -148,25 +128,13 @@ class external_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "external_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { if (stan::math::logical_negation( (stan::math::primitive_value(emit_transformed_parameters__) || @@ -190,11 +158,7 @@ class external_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } template * = nullptr> inline void @@ -203,11 +167,7 @@ class external_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } inline void get_param_names(std::vector& names__, const bool @@ -342,6 +302,9 @@ stan::math::profile_map& get_stan_profile_data() { } #endif STAN_REGISTER_MAP_RECT(1, external_model_namespace::external_map_rectable_functor__) +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif Warning in 'external.stan', line 7, column 7: Functions do not need to be declared before definition; all user defined function names are always in scope regardless of definition order. diff --git a/test/integration/cli-args/allow-undefined/standalone-cpp.expected b/test/integration/cli-args/allow-undefined/standalone-cpp.expected index 27726612a..53f6bb3ae 100644 --- a/test/integration/cli-args/allow-undefined/standalone-cpp.expected +++ b/test/integration/cli-args/allow-undefined/standalone-cpp.expected @@ -1,6 +1,12 @@ $ ../../../../../install/default/bin/stanc --standalone-functions --allow-undefined --print-cpp external.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace external_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -31,14 +37,8 @@ internal_fun(const std::vector>& a, const std::vector>& d, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; return stan::math::sum( @@ -71,6 +71,9 @@ internal_fun(const std::vector>& a, pstream__ = nullptr) { return external_model_namespace::internal_fun(a, d, pstream__); } +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif Warning in 'external.stan', line 7, column 7: Functions do not need to be declared before definition; all user defined function names are always in scope regardless of definition order. diff --git a/test/integration/cli-args/filename-in-msg/filename_good.expected b/test/integration/cli-args/filename-in-msg/filename_good.expected index 586f06a82..bef471c8b 100644 --- a/test/integration/cli-args/filename-in-msg/filename_good.expected +++ b/test/integration/cli-args/filename-in-msg/filename_good.expected @@ -1,6 +1,12 @@ $ ../../../../../install/default/bin/stanc --filename-in-msg=foo.stan --print-cpp filename_good.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace filename_good_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -19,19 +25,11 @@ class filename_good_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "filename_good_model_namespace::filename_good_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; p = std::numeric_limits::quiet_NaN(); @@ -65,15 +63,9 @@ class filename_good_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "filename_good_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; lp_accum__.add(lp__); return lp_accum__.sum(); } @@ -91,15 +83,9 @@ class filename_good_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "filename_good_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; lp_accum__.add(lp__); return lp_accum__.sum(); } @@ -118,25 +104,13 @@ class filename_good_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "filename_good_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { if (stan::math::logical_negation( (stan::math::primitive_value(emit_transformed_parameters__) || @@ -160,11 +134,7 @@ class filename_good_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } template * = nullptr> inline void @@ -173,11 +143,7 @@ class filename_good_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } inline void get_param_names(std::vector& names__, const bool @@ -311,3 +277,6 @@ stan::math::profile_map& get_stan_profile_data() { return filename_good_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif diff --git a/test/integration/good/code-gen/cl.expected b/test/integration/good/code-gen/cl.expected index b2cbd4a1d..94ee08469 100644 --- a/test/integration/good/code-gen/cl.expected +++ b/test/integration/good/code-gen/cl.expected @@ -1,6 +1,12 @@ $ ../../../../../install/default/bin/stanc --print-cpp --use-opencl optimize_glm.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace optimize_glm_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -262,19 +268,11 @@ class optimize_glm_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "optimize_glm_model_namespace::optimize_glm_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__ = std::numeric_limits::min(); pos__ = 1; @@ -506,15 +504,9 @@ class optimize_glm_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "optimize_glm_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix alpha_v = Eigen::Matrix::Constant(k, DUMMY_VAR__); @@ -1223,15 +1215,9 @@ class optimize_glm_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "optimize_glm_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix alpha_v = Eigen::Matrix::Constant(k, DUMMY_VAR__); @@ -1941,25 +1927,13 @@ class optimize_glm_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "optimize_glm_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix alpha_v = Eigen::Matrix::Constant(k, @@ -2033,11 +2007,7 @@ class optimize_glm_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { Eigen::Matrix alpha_v = Eigen::Matrix::Constant(k, DUMMY_VAR__); @@ -2104,11 +2074,7 @@ class optimize_glm_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "alpha_v", @@ -2452,3 +2418,6 @@ stan::math::profile_map& get_stan_profile_data() { return optimize_glm_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif diff --git a/test/integration/good/code-gen/complex_numbers/cpp.expected b/test/integration/good/code-gen/complex_numbers/cpp.expected index 4f092f441..48d5b7847 100644 --- a/test/integration/good/code-gen/complex_numbers/cpp.expected +++ b/test/integration/good/code-gen/complex_numbers/cpp.expected @@ -1,6 +1,12 @@ $ ../../../../../../install/default/bin/stanc --print-cpp basic_op_param.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace basic_op_param_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -155,19 +161,11 @@ class basic_op_param_model final : public model_base_crtp random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "basic_op_param_model_namespace::basic_op_param_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 125; context__.validate_dims("data initialization", "N", "int", @@ -230,15 +228,9 @@ class basic_op_param_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "basic_op_param_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix,-1,-1> cmat = Eigen::Matrix,-1,-1>::Constant(N, N, @@ -771,15 +763,9 @@ class basic_op_param_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "basic_op_param_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix,-1,-1> cmat = Eigen::Matrix,-1,-1>::Constant(N, N, @@ -1313,25 +1299,13 @@ class basic_op_param_model final : public model_base_crtp stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "basic_op_param_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix,-1,-1> cmat = Eigen::Matrix,-1,-1>::Constant(N, N, @@ -1898,11 +1872,7 @@ class basic_op_param_model final : public model_base_crtp stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { Eigen::Matrix,-1,-1> cmat = Eigen::Matrix,-1,-1>::Constant(N, N, @@ -1969,11 +1939,7 @@ class basic_op_param_model final : public model_base_crtp using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "cmat", "double", @@ -2424,10 +2390,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return basic_op_param_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../../install/default/bin/stanc --print-cpp basic_operations.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace basic_operations_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -2595,19 +2570,11 @@ class basic_operations_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__ = std::numeric_limits::min(); pos__ = 1; @@ -2807,15 +2774,9 @@ class basic_operations_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "basic_operations_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; lp_accum__.add(lp__); return lp_accum__.sum(); } @@ -2833,15 +2794,9 @@ class basic_operations_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "basic_operations_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; lp_accum__.add(lp__); return lp_accum__.sum(); } @@ -2860,25 +2815,13 @@ class basic_operations_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "basic_operations_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { if (stan::math::logical_negation( (stan::math::primitive_value(emit_transformed_parameters__) || @@ -3370,11 +3313,7 @@ class basic_operations_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } template * = nullptr> inline void @@ -3383,11 +3322,7 @@ class basic_operations_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } inline void get_param_names(std::vector& names__, const bool @@ -3610,10 +3545,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return basic_operations_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../../install/default/bin/stanc --print-cpp basic_ops_mix.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace basic_ops_mix_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -3819,19 +3763,11 @@ class basic_ops_mix_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "basic_ops_mix_model_namespace::basic_ops_mix_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__ = std::numeric_limits::min(); pos__ = 1; @@ -4048,15 +3984,9 @@ class basic_ops_mix_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "basic_ops_mix_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix,-1,-1> cvmat = Eigen::Matrix,-1,-1>::Constant(N, N, @@ -4677,15 +4607,9 @@ class basic_ops_mix_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "basic_ops_mix_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix,-1,-1> cvmat = Eigen::Matrix,-1,-1>::Constant(N, N, @@ -5307,25 +5231,13 @@ class basic_ops_mix_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "basic_ops_mix_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix,-1,-1> cvmat = Eigen::Matrix,-1,-1>::Constant(N, N, @@ -5980,11 +5892,7 @@ class basic_ops_mix_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { Eigen::Matrix,-1,-1> cvmat = Eigen::Matrix,-1,-1>::Constant(N, N, @@ -6051,11 +5959,7 @@ class basic_ops_mix_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "cvmat", "double", @@ -6506,10 +6410,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return basic_ops_mix_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../../install/default/bin/stanc --print-cpp complex_data.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace complex_data_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -6564,19 +6477,11 @@ class complex_data_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "complex_data_model_namespace::complex_data_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__ = std::numeric_limits::min(); pos__ = 1; @@ -6831,15 +6736,9 @@ class complex_data_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "complex_data_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; lp_accum__.add(lp__); return lp_accum__.sum(); } @@ -6857,15 +6756,9 @@ class complex_data_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "complex_data_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; lp_accum__.add(lp__); return lp_accum__.sum(); } @@ -6884,25 +6777,13 @@ class complex_data_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "complex_data_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { if (stan::math::logical_negation( (stan::math::primitive_value(emit_transformed_parameters__) || @@ -6926,11 +6807,7 @@ class complex_data_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } template * = nullptr> inline void @@ -6939,11 +6816,7 @@ class complex_data_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } inline void get_param_names(std::vector& names__, const bool @@ -7076,10 +6949,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return complex_data_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../../install/default/bin/stanc --print-cpp complex_scalar.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace complex_scalar_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -7601,14 +7483,8 @@ foo10(const T0__& z, std::ostream* pstream__); std::complex foo(std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 406; return stan::math::promote_scalar>( @@ -7628,14 +7504,8 @@ stan::promote_args_t> foo1(const T0__& z, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 408; return 1.0; @@ -7651,14 +7521,8 @@ std::complex> foo2(const T0__& r, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 410; return stan::math::to_complex(r); @@ -7677,14 +7541,8 @@ std::complex>> foo3(const T0__& z, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 412; return z; @@ -7696,14 +7554,8 @@ foo3(const T0__& z, std::ostream* pstream__) { std::vector> foo4(std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 414; return std::vector>{stan::math::promote_scalar< @@ -7730,14 +7582,8 @@ stan::promote_args_t> foo5(const T0__& z, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 416; return 1.0; @@ -7753,14 +7599,8 @@ std::vector>> foo6(const T0__& r, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 418; return std::vector>{stan::math::to_complex( @@ -7784,14 +7624,8 @@ std::vector>>> foo7(const T0__& z, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 420; return z; @@ -7816,14 +7650,8 @@ stan::promote_args_t> foo8(const T0__& z, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 422; return 1.0; @@ -7839,14 +7667,8 @@ std::vector>>> foo9(const T0__& r, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 424; return std::vector>>{std::vector< @@ -7882,14 +7704,8 @@ std::vector< foo10(const T0__& z, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 426; return z; @@ -7915,19 +7731,11 @@ class complex_scalar_model final : public model_base_crtp random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "complex_scalar_model_namespace::complex_scalar_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__ = std::numeric_limits::min(); pos__ = 1; @@ -8198,15 +8006,9 @@ class complex_scalar_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "complex_scalar_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ p_r = DUMMY_VAR__; current_statement__ = 1; @@ -8459,15 +8261,9 @@ class complex_scalar_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "complex_scalar_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ p_r = DUMMY_VAR__; current_statement__ = 1; @@ -8721,25 +8517,13 @@ class complex_scalar_model final : public model_base_crtp stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "complex_scalar_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { double p_r = std::numeric_limits::quiet_NaN(); current_statement__ = 1; @@ -9689,11 +9473,7 @@ class complex_scalar_model final : public model_base_crtp stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { local_scalar_t__ p_r = DUMMY_VAR__; current_statement__ = 1; @@ -9739,11 +9519,7 @@ class complex_scalar_model final : public model_base_crtp using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "p_r", "double", @@ -10148,10 +9924,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return complex_scalar_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../../install/default/bin/stanc --print-cpp complex_vectors.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace complex_vectors_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -10172,19 +9957,11 @@ class complex_vectors_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; num_params_r__ = 0U; } inline std::string model_name() const final { @@ -10208,15 +9985,9 @@ class complex_vectors_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "complex_vectors_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix,-1,1> z = Eigen::Matrix,-1,1>::Constant(3, @@ -10296,15 +10067,9 @@ class complex_vectors_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "complex_vectors_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix,-1,1> z = Eigen::Matrix,-1,1>::Constant(3, @@ -10385,25 +10150,13 @@ class complex_vectors_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "complex_vectors_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix,-1,1> z = Eigen::Matrix,-1,1>::Constant(3, @@ -10497,11 +10250,7 @@ class complex_vectors_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } template * = nullptr> inline void @@ -10510,11 +10259,7 @@ class complex_vectors_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } inline void get_param_names(std::vector& names__, const bool @@ -10740,10 +10485,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return complex_vectors_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../../install/default/bin/stanc --print-cpp user_function_templating.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace user_function_templating_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -10832,15 +10586,9 @@ Eigen::Matrix>>,-1,-1> foo(const T0__& Z_arg__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& Z = stan::math::to_ref(Z_arg__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 15; return Z; @@ -10856,15 +10604,9 @@ Eigen::Matrix>,-1,-1> foo(const T0__& A_arg__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& A = stan::math::to_ref(A_arg__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 17; { @@ -10884,15 +10626,9 @@ Eigen::Matrix>>,-1,1> foo(const T0__& Z_arg__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& Z = stan::math::to_ref(Z_arg__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 19; return Z; @@ -10908,15 +10644,9 @@ Eigen::Matrix>,-1,1> foo(const T0__& A_arg__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& A = stan::math::to_ref(A_arg__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 21; { @@ -10936,15 +10666,9 @@ Eigen::Matrix>>,1,-1> foo(const T0__& Z_arg__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& Z = stan::math::to_ref(Z_arg__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 23; return Z; @@ -10960,15 +10684,9 @@ Eigen::Matrix>,1,-1> foo(const T0__& A_arg__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& A = stan::math::to_ref(A_arg__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 25; { @@ -10990,14 +10708,8 @@ std::vector< foo(const T0__& Z, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 27; return Z; @@ -11015,14 +10727,8 @@ std::vector< foo(const T0__& A, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 29; { @@ -11044,19 +10750,11 @@ class user_function_templating_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 14; N = std::numeric_limits::min(); @@ -11088,15 +10786,9 @@ class user_function_templating_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "user_function_templating_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { current_statement__ = 1; stan::math::validate_non_negative_index("x", "N", N); @@ -11157,15 +10849,9 @@ class user_function_templating_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "user_function_templating_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { current_statement__ = 1; stan::math::validate_non_negative_index("x", "N", N); @@ -11227,25 +10913,13 @@ class user_function_templating_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "user_function_templating_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { if (stan::math::logical_negation( (stan::math::primitive_value(emit_transformed_parameters__) || @@ -11269,11 +10943,7 @@ class user_function_templating_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } template * = nullptr> inline void @@ -11282,11 +10952,7 @@ class user_function_templating_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } inline void get_param_names(std::vector& names__, const bool @@ -11420,3 +11086,6 @@ stan::math::profile_map& get_stan_profile_data() { return user_function_templating_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif diff --git a/test/integration/good/code-gen/cpp.expected b/test/integration/good/code-gen/cpp.expected index ce59c8c2a..95a57e4d2 100644 --- a/test/integration/good/code-gen/cpp.expected +++ b/test/integration/good/code-gen/cpp.expected @@ -1,6 +1,12 @@ $ ../../../../../install/default/bin/stanc --print-cpp 8_schools_ncp.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace _8_schools_ncp_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -33,19 +39,11 @@ class _8_schools_ncp_model final : public model_base_crtp<_8_schools_ncp_model> random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "_8_schools_ncp_model_namespace::_8_schools_ncp_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 9; context__.validate_dims("data initialization", "J", "int", @@ -104,15 +102,9 @@ class _8_schools_ncp_model final : public model_base_crtp<_8_schools_ncp_model> stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "_8_schools_ncp_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ mu = DUMMY_VAR__; current_statement__ = 1; @@ -162,15 +154,9 @@ class _8_schools_ncp_model final : public model_base_crtp<_8_schools_ncp_model> stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "_8_schools_ncp_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ mu = DUMMY_VAR__; current_statement__ = 1; @@ -221,25 +207,13 @@ class _8_schools_ncp_model final : public model_base_crtp<_8_schools_ncp_model> stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "_8_schools_ncp_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { double mu = std::numeric_limits::quiet_NaN(); current_statement__ = 1; @@ -289,11 +263,7 @@ class _8_schools_ncp_model final : public model_base_crtp<_8_schools_ncp_model> stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { local_scalar_t__ mu = DUMMY_VAR__; current_statement__ = 1; @@ -321,11 +291,7 @@ class _8_schools_ncp_model final : public model_base_crtp<_8_schools_ncp_model> using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "mu", "double", @@ -528,10 +494,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return _8_schools_ncp_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --print-cpp 8start_with_number.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace _8start_with_number_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -549,19 +524,11 @@ class _8start_with_number_model final : public model_base_crtp<_8start_with_numb random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "_8start_with_number_model_namespace::_8start_with_number_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 2; context__.validate_dims("data initialization", "good_model", "int", @@ -595,15 +562,9 @@ class _8start_with_number_model final : public model_base_crtp<_8start_with_numb stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "_8start_with_number_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ bar = DUMMY_VAR__; current_statement__ = 1; @@ -628,15 +589,9 @@ class _8start_with_number_model final : public model_base_crtp<_8start_with_numb stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "_8start_with_number_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ bar = DUMMY_VAR__; current_statement__ = 1; @@ -662,25 +617,13 @@ class _8start_with_number_model final : public model_base_crtp<_8start_with_numb stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "_8start_with_number_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { double bar = std::numeric_limits::quiet_NaN(); current_statement__ = 1; @@ -708,11 +651,7 @@ class _8start_with_number_model final : public model_base_crtp<_8start_with_numb stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { local_scalar_t__ bar = DUMMY_VAR__; current_statement__ = 1; @@ -729,11 +668,7 @@ class _8start_with_number_model final : public model_base_crtp<_8start_with_numb using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "bar", "double", @@ -879,10 +814,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return _8start_with_number_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --print-cpp complex-tuples.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace complex_tuples_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -932,14 +876,8 @@ f(const T0__& x, T1__1__>>>& x2, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 9; return std::tuple>>(1, @@ -969,19 +907,11 @@ class complex_tuples_model final : public model_base_crtp random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "complex_tuples_model_namespace::complex_tuples_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__ = std::numeric_limits::min(); pos__ = 1; @@ -1074,15 +1004,9 @@ class complex_tuples_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "complex_tuples_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; lp_accum__.add(lp__); return lp_accum__.sum(); } @@ -1100,15 +1024,9 @@ class complex_tuples_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "complex_tuples_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; lp_accum__.add(lp__); return lp_accum__.sum(); } @@ -1127,25 +1045,13 @@ class complex_tuples_model final : public model_base_crtp stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "complex_tuples_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { if (stan::math::logical_negation( (stan::math::primitive_value(emit_transformed_parameters__) || @@ -1169,11 +1075,7 @@ class complex_tuples_model final : public model_base_crtp stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } template * = nullptr> inline void @@ -1182,11 +1084,7 @@ class complex_tuples_model final : public model_base_crtp using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } inline void get_param_names(std::vector& names__, const bool @@ -1319,10 +1217,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return complex_tuples_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --print-cpp container-promotion.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace container_promotion_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -1353,19 +1260,11 @@ class container_promotion_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__ = std::numeric_limits::min(); pos__ = 1; @@ -1403,15 +1302,9 @@ class container_promotion_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "container_promotion_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ y = DUMMY_VAR__; current_statement__ = 1; @@ -1505,15 +1398,9 @@ class container_promotion_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "container_promotion_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ y = DUMMY_VAR__; current_statement__ = 1; @@ -1608,25 +1495,13 @@ class container_promotion_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "container_promotion_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { double y = std::numeric_limits::quiet_NaN(); current_statement__ = 1; @@ -1762,11 +1637,7 @@ class container_promotion_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { local_scalar_t__ y = DUMMY_VAR__; current_statement__ = 1; @@ -1783,11 +1654,7 @@ class container_promotion_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "y", "double", @@ -2037,10 +1904,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return container_promotion_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --print-cpp cpp-reserved-words.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace cpp_reserved_words_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -2157,42 +2033,24 @@ template >*> void _stan_alignas(const T0__& _stan_asm, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } // void _stan_alignof(int) template >*> void _stan_alignof(const T0__& _stan_char, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } // int _stan_and(int) template >*> int _stan_and(const T0__& _stan_STAN_MAJOR, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 67; return _stan_STAN_MAJOR; @@ -2207,14 +2065,8 @@ template ; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } // void _stan_asm(vector) template >; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& _stan_class = stan::math::to_ref(_stan_class_arg__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } // void _stan_bitand(int) template >*> void _stan_bitand(const T0__& _stan_constexpr, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } // void _stan_bitor() void _stan_bitor(std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } // void _stan_bool() void _stan_bool(std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } // void _stan_case() void _stan_case(std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } // void _stan_catch() void _stan_catch(std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } // void _stan_char() void _stan_char(std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } // void _stan_char16_t() void _stan_char16_t(std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } // void _stan_char32_t() void _stan_char32_t(std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } class cpp_reserved_words_model final : public model_base_crtp { private: @@ -2358,19 +2156,11 @@ class cpp_reserved_words_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 53; context__.validate_dims("data initialization", "class", "double", @@ -2471,15 +2261,9 @@ class cpp_reserved_words_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "cpp_reserved_words_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ _stan_explicit = DUMMY_VAR__; current_statement__ = 1; @@ -2563,15 +2347,9 @@ class cpp_reserved_words_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "cpp_reserved_words_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ _stan_explicit = DUMMY_VAR__; current_statement__ = 1; @@ -2656,25 +2434,13 @@ class cpp_reserved_words_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "cpp_reserved_words_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { double _stan_explicit = std::numeric_limits::quiet_NaN(); current_statement__ = 1; @@ -2804,11 +2570,7 @@ class cpp_reserved_words_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { local_scalar_t__ _stan_explicit = DUMMY_VAR__; current_statement__ = 1; @@ -2881,11 +2643,7 @@ class cpp_reserved_words_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "explicit", @@ -3225,10 +2983,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return cpp_reserved_words_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --print-cpp data_only_functions.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace data_only_functions_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -3308,15 +3075,9 @@ stan::promote_args_t> baz(const T0__& y_arg__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& y = stan::math::to_ref(y_arg__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 14; return stan::model::rvalue(y, "y", stan::model::index_uni(1), @@ -3331,14 +3092,8 @@ bar(const std::vector>& z, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 16; return stan::model::rvalue( @@ -3354,14 +3109,8 @@ foo(const std::vector>>& x, const std::vector>& y, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 18; return stan::model::rvalue(x, "x", stan::model::index_uni(1), @@ -3378,15 +3127,9 @@ stan::promote_args_t> baz_param(const T0__& y_arg__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& y = stan::math::to_ref(y_arg__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 20; return stan::model::rvalue(y, "y", stan::model::index_uni(1), @@ -3404,14 +3147,8 @@ stan::promote_args_t> bar_param(const T0__& z, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 22; return stan::model::rvalue( @@ -3442,14 +3179,8 @@ stan::promote_args_t> foo_param(const T0__& x, const T1__& y, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 24; return stan::model::rvalue(x, "x", stan::model::index_uni(1), @@ -3469,19 +3200,11 @@ class data_only_functions_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__ = std::numeric_limits::min(); pos__ = 1; @@ -3545,15 +3268,9 @@ class data_only_functions_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "data_only_functions_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix p = Eigen::Matrix::Constant(N, N, DUMMY_VAR__); @@ -3606,15 +3323,9 @@ class data_only_functions_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "data_only_functions_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix p = Eigen::Matrix::Constant(N, N, DUMMY_VAR__); @@ -3668,25 +3379,13 @@ class data_only_functions_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "data_only_functions_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix p = Eigen::Matrix::Constant(N, N, @@ -3716,11 +3415,7 @@ class data_only_functions_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { Eigen::Matrix p = Eigen::Matrix::Constant(N, N, DUMMY_VAR__); @@ -3740,11 +3435,7 @@ class data_only_functions_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "p", "double", @@ -3917,10 +3608,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return data_only_functions_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --print-cpp double-reject.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace double_reject_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -3938,19 +3638,11 @@ class double_reject_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "double_reject_model_namespace::double_reject_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; num_params_r__ = 0U; } inline std::string model_name() const final { @@ -3974,15 +3666,9 @@ class double_reject_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "double_reject_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { current_statement__ = 1; { @@ -4016,15 +3702,9 @@ class double_reject_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "double_reject_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { current_statement__ = 1; { @@ -4059,25 +3739,13 @@ class double_reject_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "double_reject_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { if (stan::math::logical_negation( (stan::math::primitive_value(emit_transformed_parameters__) || @@ -4101,11 +3769,7 @@ class double_reject_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } template * = nullptr> inline void @@ -4114,11 +3778,7 @@ class double_reject_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } inline void get_param_names(std::vector& names__, const bool @@ -4252,12 +3912,21 @@ stan::math::profile_map& get_stan_profile_data() { return double_reject_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif Warning in 'double-reject.stan', line 4, column 2: Unreachable statement (following a reject, fatal_error, break, continue, or return) found, is this intended? $ ../../../../../install/default/bin/stanc --print-cpp eight_schools_ncp.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace eight_schools_ncp_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -4290,19 +3959,11 @@ class eight_schools_ncp_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 9; context__.validate_dims("data initialization", "J", "int", @@ -4361,15 +4022,9 @@ class eight_schools_ncp_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "eight_schools_ncp_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ mu = DUMMY_VAR__; current_statement__ = 1; @@ -4419,15 +4074,9 @@ class eight_schools_ncp_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "eight_schools_ncp_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ mu = DUMMY_VAR__; current_statement__ = 1; @@ -4478,25 +4127,13 @@ class eight_schools_ncp_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "eight_schools_ncp_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { double mu = std::numeric_limits::quiet_NaN(); current_statement__ = 1; @@ -4546,11 +4183,7 @@ class eight_schools_ncp_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { local_scalar_t__ mu = DUMMY_VAR__; current_statement__ = 1; @@ -4578,11 +4211,7 @@ class eight_schools_ncp_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "mu", "double", @@ -4785,10 +4414,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return eight_schools_ncp_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --print-cpp funcall-type-promotion.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace funcall_type_promotion_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -4828,14 +4466,8 @@ stan::promote_args_t foo(const T0__& x, const T1__& y, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 7; return (x / y); @@ -4852,14 +4484,8 @@ template ; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 9; if (pstream__) { @@ -4879,19 +4505,11 @@ class funcall_type_promotion_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 4; x = std::numeric_limits::quiet_NaN(); @@ -4931,15 +4549,9 @@ class funcall_type_promotion_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "funcall_type_promotion_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ x2 = DUMMY_VAR__; current_statement__ = 1; @@ -4972,15 +4584,9 @@ class funcall_type_promotion_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "funcall_type_promotion_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ x2 = DUMMY_VAR__; current_statement__ = 1; @@ -5014,25 +4620,13 @@ class funcall_type_promotion_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "funcall_type_promotion_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { if (stan::math::logical_negation( (stan::math::primitive_value(emit_transformed_parameters__) || @@ -5056,11 +4650,7 @@ class funcall_type_promotion_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } template * = nullptr> inline void @@ -5069,11 +4659,7 @@ class funcall_type_promotion_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } inline void get_param_names(std::vector& names__, const bool @@ -5206,10 +4792,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return funcall_type_promotion_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --print-cpp mixed_type_arrays.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace mixed_type_arrays_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -5230,19 +4825,11 @@ class mixed_type_arrays_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 5; x = std::vector(3, std::numeric_limits::quiet_NaN()); @@ -5272,15 +4859,9 @@ class mixed_type_arrays_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "mixed_type_arrays_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { std::vector xx = std::vector(3, DUMMY_VAR__); @@ -5331,15 +4912,9 @@ class mixed_type_arrays_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "mixed_type_arrays_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { std::vector xx = std::vector(3, DUMMY_VAR__); @@ -5391,25 +4966,13 @@ class mixed_type_arrays_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "mixed_type_arrays_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { std::vector xx = std::vector(3, std::numeric_limits::quiet_NaN()); @@ -5483,11 +5046,7 @@ class mixed_type_arrays_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { std::vector xx = std::vector(3, DUMMY_VAR__); @@ -5506,11 +5065,7 @@ class mixed_type_arrays_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "xx", "double", @@ -5718,10 +5273,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return mixed_type_arrays_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --print-cpp mother.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace mother_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -7462,14 +7026,8 @@ template >*> int foo(const T0__& n, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 594; if (stan::math::logical_eq(n, 0)) { @@ -7508,14 +7066,8 @@ sho(const T0__& t, const T1__& y, const T2__& theta, stan::base_type_t, stan::base_type_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { std::vector dydt = std::vector(2, DUMMY_VAR__); @@ -7539,14 +7091,8 @@ sho(const T0__& t, const T1__& y, const T2__& theta, double foo_bar0(std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 602; return 0.0; @@ -7561,14 +7107,8 @@ template foo_bar1(const T0__& x, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 604; return 1.0; @@ -7586,14 +7126,8 @@ stan::promote_args_t foo_bar2(const T0__& x, const T1__& y, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 606; return 2.0; @@ -7610,11 +7144,7 @@ stan::promote_args_t foo_lpmf(const T0__& y, const T1__& lambda, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 608; return 1.0; @@ -7631,14 +7161,8 @@ stan::promote_args_t foo_lcdf(const T0__& y, const T1__& lambda, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 610; return 1.0; @@ -7655,14 +7179,8 @@ stan::promote_args_t foo_lccdf(const T0__& y, const T1__& lambda, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 612; return 1.0; @@ -7681,14 +7199,8 @@ foo_rng(const T0__& mu, const T1__& sigma, RNG& base_rng__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 614; return stan::math::normal_rng(mu, sigma, base_rng__); @@ -7706,11 +7218,7 @@ unit_normal_lp(const T0__& u, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 616; lp_accum__.add(stan::math::normal_lpdf(u, 0, 1)); @@ -7725,14 +7233,8 @@ template >*> int foo_1(const T0__& a, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 620; while (1) { @@ -7934,14 +7436,8 @@ template >*> int foo_2(const T0__& a, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { std::vector vs = std::vector(2, std::numeric_limits::min()); @@ -7969,14 +7465,8 @@ std::vector> foo_3(const T0__& t, const T1__& n, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 707; return stan::math::rep_array(t, n); @@ -7994,11 +7484,7 @@ foo_lp(const T0__& x, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 709; return (x + stan::math::get_lp(lp__, lp_accum__)); @@ -8016,14 +7502,8 @@ template >; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 711; { @@ -8054,14 +7534,8 @@ relative_diff(const T0__& x, const T1__& y, const T2__& max_, const T3__& min_, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { local_scalar_t__ abs_diff = DUMMY_VAR__; local_scalar_t__ avg_scale = DUMMY_VAR__; @@ -8119,16 +7593,10 @@ foo_5(const T0__& shared_params_arg__, const T1__& job_params_arg__, using local_scalar_t__ = stan::promote_args_t, stan::base_type_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& shared_params = stan::math::to_ref(shared_params_arg__); const auto& job_params = stan::math::to_ref(job_params_arg__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 723; return stan::math::promote_scalar( @@ -8155,14 +7623,8 @@ foo_five_args(const T0__& x1, const T1__& x2, const T2__& x3, const T3__& x4, const T4__& x5, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 725; return x1; @@ -8194,11 +7656,7 @@ foo_five_args_lp(const T0__& x1, const T1__& x2, const T2__& x3, const T3__& using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 727; return x1; @@ -8216,15 +7674,9 @@ covsqrt2corsqrt(const T0__& mat_arg__, const T1__& invert, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& mat = stan::math::to_ref(mat_arg__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 729; stan::math::validate_non_negative_index("o", "rows(mat)", @@ -8319,16 +7771,10 @@ f0(const T0__& a1, const T1__& a2, const T2__& a3, const T3__& a4, stan::base_type_t, stan::base_type_t>>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& a7 = stan::math::to_ref(a7_arg__); const auto& a10 = stan::math::to_ref(a10_arg__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 737; if (pstream__) { @@ -8405,16 +7851,10 @@ f1(const T0__& a1, const T1__& a2, const T2__& a3, const T3__& a4, stan::base_type_t, stan::base_type_t>>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& a7 = stan::math::to_ref(a7_arg__); const auto& a10 = stan::math::to_ref(a10_arg__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 739; return a1; @@ -8488,16 +7928,10 @@ f2(const T0__& a1, const T1__& a2, const T2__& a3, const T3__& a4, stan::base_type_t, stan::base_type_t>>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& a7 = stan::math::to_ref(a7_arg__); const auto& a10 = stan::math::to_ref(a10_arg__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 741; return a2; @@ -8571,16 +8005,10 @@ f3(const T0__& a1, const T1__& a2, const T2__& a3, const T3__& a4, stan::base_type_t, stan::base_type_t>>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& a7 = stan::math::to_ref(a7_arg__); const auto& a10 = stan::math::to_ref(a10_arg__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 743; return a3; @@ -8657,16 +8085,10 @@ f4(const T0__& a1, const T1__& a2, const T2__& a3, const T3__& a4, stan::base_type_t, stan::base_type_t>>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& a7 = stan::math::to_ref(a7_arg__); const auto& a10 = stan::math::to_ref(a10_arg__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 745; return a4; @@ -8745,16 +8167,10 @@ f5(const T0__& a1, const T1__& a2, const T2__& a3, const T3__& a4, stan::base_type_t, stan::base_type_t>>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& a7 = stan::math::to_ref(a7_arg__); const auto& a10 = stan::math::to_ref(a10_arg__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 747; return a5; @@ -8834,16 +8250,10 @@ f6(const T0__& a1, const T1__& a2, const T2__& a3, const T3__& a4, stan::base_type_t, stan::base_type_t>>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& a7 = stan::math::to_ref(a7_arg__); const auto& a10 = stan::math::to_ref(a10_arg__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 749; return a6; @@ -8922,16 +8332,10 @@ f7(const T0__& a1, const T1__& a2, const T2__& a3, const T3__& a4, stan::base_type_t, stan::base_type_t>>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& a7 = stan::math::to_ref(a7_arg__); const auto& a10 = stan::math::to_ref(a10_arg__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 751; return a7; @@ -9011,16 +8415,10 @@ f8(const T0__& a1, const T1__& a2, const T2__& a3, const T3__& a4, stan::base_type_t, stan::base_type_t>>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& a7 = stan::math::to_ref(a7_arg__); const auto& a10 = stan::math::to_ref(a10_arg__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 753; return a8; @@ -9101,16 +8499,10 @@ f9(const T0__& a1, const T1__& a2, const T2__& a3, const T3__& a4, stan::base_type_t, stan::base_type_t>>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& a7 = stan::math::to_ref(a7_arg__); const auto& a10 = stan::math::to_ref(a10_arg__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 755; return a9; @@ -9189,16 +8581,10 @@ f10(const T0__& a1, const T1__& a2, const T2__& a3, const T3__& a4, stan::base_type_t, stan::base_type_t>>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& a7 = stan::math::to_ref(a7_arg__); const auto& a10 = stan::math::to_ref(a10_arg__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 757; return a10; @@ -9278,16 +8664,10 @@ f11(const T0__& a1, const T1__& a2, const T2__& a3, const T3__& a4, stan::base_type_t, stan::base_type_t>>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& a7 = stan::math::to_ref(a7_arg__); const auto& a10 = stan::math::to_ref(a10_arg__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 759; return a11; @@ -9368,16 +8748,10 @@ f12(const T0__& a1, const T1__& a2, const T2__& a3, const T3__& a4, stan::base_type_t, stan::base_type_t>>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& a7 = stan::math::to_ref(a7_arg__); const auto& a10 = stan::math::to_ref(a10_arg__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 761; return a12; @@ -9389,14 +8763,8 @@ f12(const T0__& a1, const T1__& a2, const T2__& a3, const T3__& a4, void foo_6(std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int a = std::numeric_limits::min(); local_scalar_t__ b = DUMMY_VAR__; @@ -9420,14 +8788,8 @@ void foo_6(std::ostream* pstream__) { Eigen::Matrix matfoo(std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 769; return stan::math::to_matrix( @@ -9447,14 +8809,8 @@ Eigen::Matrix matfoo(std::ostream* pstream__) { Eigen::Matrix vecfoo(std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 771; return stan::math::promote_scalar( @@ -9471,14 +8827,8 @@ Eigen::Matrix,-1,1> vecmufoo(const T0__& mu, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { Eigen::Matrix l = Eigen::Matrix::Constant(10, DUMMY_VAR__); @@ -9499,14 +8849,8 @@ Eigen::Matrix,-1,1> vecmubar(const T0__& mu, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { Eigen::Matrix l = Eigen::Matrix::Constant(10, DUMMY_VAR__); @@ -9543,16 +8887,10 @@ algebra_system(const T0__& x_arg__, const T1__& y_arg__, const T2__& dat, stan::base_type_t, stan::base_type_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& x = stan::math::to_ref(x_arg__); const auto& y = stan::math::to_ref(y_arg__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { Eigen::Matrix f_x = Eigen::Matrix::Constant(2, DUMMY_VAR__); @@ -9586,16 +8924,10 @@ binomialf(const T0__& phi_arg__, const T1__& theta_arg__, using local_scalar_t__ = stan::promote_args_t, stan::base_type_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& phi = stan::math::to_ref(phi_arg__); const auto& theta = stan::math::to_ref(theta_arg__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { Eigen::Matrix lpmf = Eigen::Matrix::Constant(1, DUMMY_VAR__); @@ -9724,19 +9056,11 @@ class mother_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "mother_model_namespace::mother_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__ = std::numeric_limits::min(); pos__ = 1; @@ -11842,15 +11166,9 @@ class mother_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "mother_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ p_real = DUMMY_VAR__; current_statement__ = 1; @@ -12365,15 +11683,9 @@ class mother_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "mother_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ p_real = DUMMY_VAR__; current_statement__ = 1; @@ -12889,25 +12201,13 @@ class mother_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "mother_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { double p_real = std::numeric_limits::quiet_NaN(); current_statement__ = 1; @@ -14030,11 +13330,7 @@ class mother_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { local_scalar_t__ p_real = DUMMY_VAR__; current_statement__ = 1; @@ -14313,11 +13609,7 @@ class mother_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "p_real", "double", @@ -15986,9 +15278,18 @@ stan::math::profile_map& get_stan_profile_data() { #endif STAN_REGISTER_MAP_RECT(1, mother_model_namespace::binomialf_functor__) STAN_REGISTER_MAP_RECT(2, mother_model_namespace::binomialf_functor__) +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif $ ../../../../../install/default/bin/stanc --print-cpp motherHOF.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace motherHOF_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -16401,14 +15702,8 @@ sho(const T0__& t, const T1__& y, const T2__& theta, const T3__& x, stan::base_type_t, stan::base_type_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { std::vector dydt = std::vector(2, DUMMY_VAR__); @@ -16455,14 +15750,8 @@ integrand(const T0__& x, const T1__& xc, const T2__& theta, const T3__& x_r, stan::base_type_t, stan::base_type_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 145; return 0.0; @@ -16491,16 +15780,10 @@ foo(const T0__& shared_params_arg__, const T1__& job_params_arg__, stan::base_type_t, stan::base_type_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& shared_params = stan::math::to_ref(shared_params_arg__); const auto& job_params = stan::math::to_ref(job_params_arg__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 147; return stan::math::promote_scalar( @@ -16530,16 +15813,10 @@ goo(const T0__& shared_params_arg__, const T1__& job_params_arg__, stan::base_type_t, stan::base_type_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& shared_params = stan::math::to_ref(shared_params_arg__); const auto& job_params = stan::math::to_ref(job_params_arg__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 149; return stan::math::promote_scalar( @@ -16556,14 +15833,8 @@ stan::promote_args_t map_rectfake(const T0__& x, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 151; return (2 * x); @@ -16592,16 +15863,10 @@ algebra_system(const T0__& x_arg__, const T1__& y_arg__, const T2__& dat, stan::base_type_t, stan::base_type_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& x = stan::math::to_ref(x_arg__); const auto& y = stan::math::to_ref(y_arg__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { Eigen::Matrix f_x = Eigen::Matrix::Constant(2, DUMMY_VAR__); @@ -16643,19 +15908,11 @@ class motherHOF_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "motherHOF_model_namespace::motherHOF_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__ = std::numeric_limits::min(); pos__ = 1; @@ -16831,15 +16088,9 @@ class motherHOF_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "motherHOF_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { std::vector y0_p = std::vector(2, DUMMY_VAR__); @@ -17158,15 +16409,9 @@ class motherHOF_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "motherHOF_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { std::vector y0_p = std::vector(2, DUMMY_VAR__); @@ -17483,25 +16728,13 @@ class motherHOF_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "motherHOF_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { std::vector y0_p = std::vector(2, std::numeric_limits::quiet_NaN()); @@ -17908,11 +17141,7 @@ class motherHOF_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { std::vector y0_p = std::vector(2, DUMMY_VAR__); @@ -17975,11 +17204,7 @@ class motherHOF_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "y0_p", "double", @@ -18431,6 +17656,9 @@ STAN_REGISTER_MAP_RECT(9, motherHOF_model_namespace::foo_functor__) STAN_REGISTER_MAP_RECT(10, motherHOF_model_namespace::foo_functor__) STAN_REGISTER_MAP_RECT(11, motherHOF_model_namespace::foo_functor__) STAN_REGISTER_MAP_RECT(12, motherHOF_model_namespace::foo_functor__) +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif Warning in 'motherHOF.stan', line 100, column 10: integrate_ode_adams is deprecated and will be removed in Stan 3.0. Use ode_adams instead. The new interface is slightly different, see: @@ -18586,6 +17814,12 @@ Warning in 'motherHOF.stan', line 189, column 10: integrate_ode_rk45 is $ ../../../../../install/default/bin/stanc --print-cpp new_integrate_interface.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace new_integrate_interface_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -19269,16 +18503,10 @@ f(const T0__& t, const T1__& z_arg__, const T2__& a, const T3__& b_arg__, stan::base_type_t, T2__, stan::base_type_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& z = stan::math::to_ref(z_arg__); const auto& b = stan::math::to_ref(b_arg__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 628; return z; @@ -19301,19 +18529,11 @@ class new_integrate_interface_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__ = std::numeric_limits::min(); pos__ = 1; @@ -19462,15 +18682,9 @@ class new_integrate_interface_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "new_integrate_interface_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ r = DUMMY_VAR__; current_statement__ = 1; @@ -21113,15 +20327,9 @@ class new_integrate_interface_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "new_integrate_interface_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ r = DUMMY_VAR__; current_statement__ = 1; @@ -22765,25 +21973,13 @@ class new_integrate_interface_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "new_integrate_interface_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { double r = std::numeric_limits::quiet_NaN(); current_statement__ = 1; @@ -24440,11 +23636,7 @@ class new_integrate_interface_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { local_scalar_t__ r = DUMMY_VAR__; current_statement__ = 1; @@ -24474,11 +23666,7 @@ class new_integrate_interface_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "r", "double", @@ -24717,10 +23905,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return new_integrate_interface_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --print-cpp old_integrate_interface.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace old_integrate_interface_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -24851,14 +24048,8 @@ dz_dt(const T0__& t, const T1__& z, const T2__& theta, const T3__& x_r, stan::base_type_t, stan::base_type_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { local_scalar_t__ u = DUMMY_VAR__; current_statement__ = 25; @@ -24902,19 +24093,11 @@ class old_integrate_interface_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__ = std::numeric_limits::min(); pos__ = 1; @@ -24992,15 +24175,9 @@ class old_integrate_interface_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "old_integrate_interface_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ alpha = DUMMY_VAR__; current_statement__ = 1; @@ -25096,15 +24273,9 @@ class old_integrate_interface_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "old_integrate_interface_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ alpha = DUMMY_VAR__; current_statement__ = 1; @@ -25201,25 +24372,13 @@ class old_integrate_interface_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "old_integrate_interface_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { double alpha = std::numeric_limits::quiet_NaN(); current_statement__ = 1; @@ -25293,11 +24452,7 @@ class old_integrate_interface_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { local_scalar_t__ alpha = DUMMY_VAR__; current_statement__ = 1; @@ -25339,11 +24494,7 @@ class old_integrate_interface_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "alpha", "double", @@ -25578,6 +24729,9 @@ stan::math::profile_map& get_stan_profile_data() { return old_integrate_interface_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif Warning in 'old_integrate_interface.stan', line 36, column 23: integrate_ode_bdf is deprecated and will be removed in Stan 3.0. Use ode_bdf instead. The new interface is slightly different, see: @@ -25585,6 +24739,12 @@ Warning in 'old_integrate_interface.stan', line 36, column 23: integrate_ode_bdf $ ../../../../../install/default/bin/stanc --print-cpp optimize_glm.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace optimize_glm_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -25840,19 +25000,11 @@ class optimize_glm_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "optimize_glm_model_namespace::optimize_glm_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__ = std::numeric_limits::min(); pos__ = 1; @@ -26078,15 +25230,9 @@ class optimize_glm_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "optimize_glm_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix alpha_v = Eigen::Matrix::Constant(k, DUMMY_VAR__); @@ -26645,15 +25791,9 @@ class optimize_glm_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "optimize_glm_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix alpha_v = Eigen::Matrix::Constant(k, DUMMY_VAR__); @@ -27213,25 +26353,13 @@ class optimize_glm_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "optimize_glm_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix alpha_v = Eigen::Matrix::Constant(k, @@ -27305,11 +26433,7 @@ class optimize_glm_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { Eigen::Matrix alpha_v = Eigen::Matrix::Constant(k, DUMMY_VAR__); @@ -27376,11 +26500,7 @@ class optimize_glm_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "alpha_v", @@ -27723,10 +26843,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return optimize_glm_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --print-cpp overloading_templating.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace overloading_templating_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -27839,14 +26968,8 @@ template >*> double foo(const T0__& p, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 17; return (p + 1.0); @@ -27861,14 +26984,8 @@ template foo(const T0__& p, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 19; return (p + 2); @@ -27884,15 +27001,9 @@ stan::promote_args_t> foo(const T0__& p_arg__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& p = stan::math::to_ref(p_arg__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 21; return (stan::math::sum(p) + 3); @@ -27908,15 +27019,9 @@ stan::promote_args_t> foo(const T0__& p_arg__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& p = stan::math::to_ref(p_arg__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 23; return (stan::math::sum(p) + 4); @@ -27932,15 +27037,9 @@ stan::promote_args_t> foo(const T0__& p_arg__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& p = stan::math::to_ref(p_arg__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 25; return (stan::math::sum(p) + 5); @@ -27959,14 +27058,8 @@ stan::promote_args_t> foo(const T0__& p, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 27; return (stan::math::sum(p) + 6); @@ -27983,14 +27076,8 @@ stan::promote_args_t> foo(const T0__& p, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 29; return (stan::math::sum( @@ -28009,14 +27096,8 @@ stan::promote_args_t> foo(const T0__& p, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 31; return (stan::math::sum( @@ -28035,14 +27116,8 @@ stan::promote_args_t> foo(const T0__& p, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 33; return (stan::math::sum( @@ -28066,14 +27141,8 @@ stan::promote_args_t> foo(const T0__& p, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 35; return (stan::math::sum( @@ -28090,14 +27159,8 @@ template ::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 37; return (stan::math::sum(p) + 12); @@ -28117,19 +27180,11 @@ class overloading_templating_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__ = std::numeric_limits::min(); pos__ = 1; @@ -28178,15 +27233,9 @@ class overloading_templating_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "overloading_templating_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ y = DUMMY_VAR__; current_statement__ = 1; @@ -28261,15 +27310,9 @@ class overloading_templating_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "overloading_templating_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ y = DUMMY_VAR__; current_statement__ = 1; @@ -28345,25 +27388,13 @@ class overloading_templating_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "overloading_templating_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { double y = std::numeric_limits::quiet_NaN(); current_statement__ = 1; @@ -28395,11 +27426,7 @@ class overloading_templating_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { local_scalar_t__ y = DUMMY_VAR__; current_statement__ = 1; @@ -28420,11 +27447,7 @@ class overloading_templating_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "y", "double", @@ -28580,10 +27603,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return overloading_templating_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --print-cpp param-constraint.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace param_constraint_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -28606,19 +27638,11 @@ class param_constraint_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 3; context__.validate_dims("data initialization", "nt", "int", @@ -28662,15 +27686,9 @@ class param_constraint_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "param_constraint_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { std::vector> L_Omega = std::vector>(nt, @@ -28708,15 +27726,9 @@ class param_constraint_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "param_constraint_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { std::vector> L_Omega = std::vector>(nt, @@ -28755,25 +27767,13 @@ class param_constraint_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "param_constraint_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { std::vector> L_Omega = std::vector>(nt, @@ -28827,11 +27827,7 @@ class param_constraint_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { std::vector> L_Omega = std::vector>(nt, @@ -28869,11 +27865,7 @@ class param_constraint_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "L_Omega", @@ -29086,10 +28078,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return param_constraint_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --print-cpp print_unicode.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace print_unicode_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -29107,19 +28108,11 @@ class print_unicode_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "print_unicode_model_namespace::print_unicode_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; if (pstream__) { @@ -29158,15 +28151,9 @@ class print_unicode_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "print_unicode_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; lp_accum__.add(lp__); return lp_accum__.sum(); } @@ -29184,15 +28171,9 @@ class print_unicode_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "print_unicode_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; lp_accum__.add(lp__); return lp_accum__.sum(); } @@ -29211,25 +28192,13 @@ class print_unicode_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "print_unicode_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { if (stan::math::logical_negation( (stan::math::primitive_value(emit_transformed_parameters__) || @@ -29253,11 +28222,7 @@ class print_unicode_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } template * = nullptr> inline void @@ -29266,11 +28231,7 @@ class print_unicode_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } inline void get_param_names(std::vector& names__, const bool @@ -29403,10 +28364,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return print_unicode_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --print-cpp promotion.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace promotion_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -29448,14 +28418,8 @@ std::complex>> ident(const T0__& x, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 5; return x; @@ -29474,14 +28438,8 @@ stan::promote_args_t> foo(const T0__& zs, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 7; return stan::model::rvalue(zs, "zs", stan::model::index_uni(0)); @@ -29498,19 +28456,11 @@ class promotion_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "promotion_model_namespace::promotion_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; num_params_r__ = 0U; } inline std::string model_name() const final { @@ -29534,15 +28484,9 @@ class promotion_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "promotion_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; lp_accum__.add(lp__); return lp_accum__.sum(); } @@ -29560,15 +28504,9 @@ class promotion_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "promotion_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; lp_accum__.add(lp__); return lp_accum__.sum(); } @@ -29587,25 +28525,13 @@ class promotion_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "promotion_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { if (stan::math::logical_negation( (stan::math::primitive_value(emit_transformed_parameters__) || @@ -29649,11 +28575,7 @@ class promotion_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } template * = nullptr> inline void @@ -29662,11 +28584,7 @@ class promotion_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } inline void get_param_names(std::vector& names__, const bool @@ -29831,10 +28749,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return promotion_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --print-cpp recursive-slicing.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace recursive_slicing_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -29956,15 +28883,9 @@ Eigen::Matrix>,-1,1> test2(const T0__& gamma_arg__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& gamma = stan::math::to_ref(gamma_arg__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int D = std::numeric_limits::min(); current_statement__ = 8; @@ -29994,15 +28915,9 @@ Eigen::Matrix>,-1,-1> matrix_pow(const T0__& a_arg__, const T1__& n, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& a = stan::math::to_ref(a_arg__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 17; if (stan::math::logical_eq(n, 0)) { @@ -30032,15 +28947,9 @@ stan::promote_args_t> foo(const T0__& a_arg__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& a = stan::math::to_ref(a_arg__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 19; return 1; @@ -30055,14 +28964,8 @@ template foo(const T0__& b, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { Eigen::Matrix B = Eigen::Matrix::Constant(10, 10, DUMMY_VAR__); @@ -30085,15 +28988,9 @@ Eigen::Matrix>,-1,1> test4(const T0__& gamma_arg__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& gamma = stan::math::to_ref(gamma_arg__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int D = std::numeric_limits::min(); current_statement__ = 24; @@ -30121,15 +29018,9 @@ Eigen::Matrix>,-1,1> test3(const T0__& gamma_arg__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& gamma = stan::math::to_ref(gamma_arg__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 29; return test4(stan::math::eval(gamma), pstream__); @@ -30144,15 +29035,9 @@ template >; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& alpha = stan::math::to_ref(alpha_arg__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int D = std::numeric_limits::min(); current_statement__ = 31; @@ -30184,15 +29069,9 @@ Eigen::Matrix>,-1,1> test7(const T0__& gamma_arg__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& gamma = stan::math::to_ref(gamma_arg__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int D = std::numeric_limits::min(); current_statement__ = 36; @@ -30227,16 +29106,10 @@ foo(const T0__& x, const T1__& s_arg__, const T2__& y_arg__, std::ostream* stan::base_type_t, stan::base_type_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& s = stan::math::to_ref(s_arg__); const auto& y = stan::math::to_ref(y_arg__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 41; return stan::model::rvalue( @@ -30261,19 +29134,11 @@ class recursive_slicing_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 4; context__.validate_dims("data initialization", "N", "int", @@ -30317,15 +29182,9 @@ class recursive_slicing_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "recursive_slicing_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix gamma = Eigen::Matrix::Constant(times, DUMMY_VAR__); @@ -30362,15 +29221,9 @@ class recursive_slicing_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "recursive_slicing_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix gamma = Eigen::Matrix::Constant(times, DUMMY_VAR__); @@ -30408,25 +29261,13 @@ class recursive_slicing_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "recursive_slicing_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix gamma = Eigen::Matrix::Constant(times, @@ -30473,11 +29314,7 @@ class recursive_slicing_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { Eigen::Matrix gamma = Eigen::Matrix::Constant(times, DUMMY_VAR__); @@ -30497,11 +29334,7 @@ class recursive_slicing_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "gamma", "double", @@ -30695,10 +29528,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return recursive_slicing_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --print-cpp reduce_sum_m1.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace reduce_sum_m1_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -30829,14 +29671,8 @@ g(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 16; if (stan::math::logical_gt(stan::math::size(y_slice), 1)) { @@ -30869,14 +29705,8 @@ h(const T0__& y_slice, const T1__& start, const T2__& end, const T3__& a, using local_scalar_t__ = stan::promote_args_t, stan::base_type_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 22; if (stan::math::logical_gt(stan::math::size(a), 1)) { @@ -30905,11 +29735,7 @@ foo_lpdf(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 24; return stan::math::normal_lpdf(y_slice, 0, 1); @@ -30926,19 +29752,11 @@ class reduce_sum_m1_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "reduce_sum_m1_model_namespace::reduce_sum_m1_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 8; N = std::numeric_limits::min(); @@ -30976,15 +29794,9 @@ class reduce_sum_m1_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "reduce_sum_m1_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { std::vector y1 = std::vector(N, DUMMY_VAR__); @@ -31031,15 +29843,9 @@ class reduce_sum_m1_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "reduce_sum_m1_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { std::vector y1 = std::vector(N, DUMMY_VAR__); @@ -31087,25 +29893,13 @@ class reduce_sum_m1_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "reduce_sum_m1_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { std::vector y1 = std::vector(N, std::numeric_limits::quiet_NaN()); @@ -31144,11 +29938,7 @@ class reduce_sum_m1_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { std::vector y1 = std::vector(N, DUMMY_VAR__); @@ -31179,11 +29969,7 @@ class reduce_sum_m1_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "y1", "double", @@ -31371,10 +30157,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return reduce_sum_m1_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --print-cpp reduce_sum_m2.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace reduce_sum_m2_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -32053,14 +30848,8 @@ g1(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 76; return stan::math::normal_lpdf(y_slice, 0, 1); @@ -32079,14 +30868,8 @@ g2(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { local_scalar_t__ sum_lpdf = DUMMY_VAR__; current_statement__ = 78; @@ -32116,14 +30899,8 @@ g3(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { local_scalar_t__ sum_lpdf = DUMMY_VAR__; current_statement__ = 84; @@ -32153,14 +30930,8 @@ g4(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { local_scalar_t__ sum_lpdf = DUMMY_VAR__; current_statement__ = 90; @@ -32196,14 +30967,8 @@ g5(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { local_scalar_t__ sum_lpdf = DUMMY_VAR__; current_statement__ = 96; @@ -32242,14 +31007,8 @@ g6(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { local_scalar_t__ sum_lpdf = DUMMY_VAR__; current_statement__ = 104; @@ -32289,14 +31048,8 @@ g7(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { local_scalar_t__ sum_lpdf = DUMMY_VAR__; current_statement__ = 112; @@ -32336,14 +31089,8 @@ g8(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { local_scalar_t__ sum_lpdf = DUMMY_VAR__; current_statement__ = 120; @@ -32388,14 +31135,8 @@ h1(const T0__& y, const T1__& start, const T2__& end, const T3__& a, using local_scalar_t__ = stan::promote_args_t, stan::base_type_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 128; return stan::math::normal_lpdf( @@ -32422,14 +31163,8 @@ h2(const T0__& y, const T1__& start, const T2__& end, const T3__& a, using local_scalar_t__ = stan::promote_args_t, stan::base_type_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { local_scalar_t__ sum_lpdf = DUMMY_VAR__; current_statement__ = 130; @@ -32464,14 +31199,8 @@ h3(const T0__& y, const T1__& start, const T2__& end, const T3__& a, using local_scalar_t__ = stan::promote_args_t, stan::base_type_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { local_scalar_t__ sum_lpdf = DUMMY_VAR__; current_statement__ = 136; @@ -32506,14 +31235,8 @@ h4(const T0__& y, const T1__& start, const T2__& end, const T3__& a, using local_scalar_t__ = stan::promote_args_t, stan::base_type_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { local_scalar_t__ sum_lpdf = DUMMY_VAR__; current_statement__ = 142; @@ -32554,14 +31277,8 @@ h5(const T0__& y, const T1__& start, const T2__& end, const T3__& a, using local_scalar_t__ = stan::promote_args_t, stan::base_type_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { local_scalar_t__ sum_lpdf = DUMMY_VAR__; current_statement__ = 148; @@ -32605,14 +31322,8 @@ h6(const T0__& y, const T1__& start, const T2__& end, const T3__& a, using local_scalar_t__ = stan::promote_args_t, stan::base_type_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { local_scalar_t__ sum_lpdf = DUMMY_VAR__; current_statement__ = 156; @@ -32657,14 +31368,8 @@ h7(const T0__& y, const T1__& start, const T2__& end, const T3__& a, using local_scalar_t__ = stan::promote_args_t, stan::base_type_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { local_scalar_t__ sum_lpdf = DUMMY_VAR__; current_statement__ = 164; @@ -32709,14 +31414,8 @@ h8(const T0__& y, const T1__& start, const T2__& end, const T3__& a, using local_scalar_t__ = stan::promote_args_t, stan::base_type_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { local_scalar_t__ sum_lpdf = DUMMY_VAR__; current_statement__ = 172; @@ -32751,19 +31450,11 @@ class reduce_sum_m2_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "reduce_sum_m2_model_namespace::reduce_sum_m2_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 33; N = std::numeric_limits::min(); @@ -32882,15 +31573,9 @@ class reduce_sum_m2_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "reduce_sum_m2_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { std::vector>> a8 = std::vector>>(N, @@ -33068,15 +31753,9 @@ class reduce_sum_m2_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "reduce_sum_m2_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { std::vector>> a8 = std::vector>>(N, @@ -33255,25 +31934,13 @@ class reduce_sum_m2_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "reduce_sum_m2_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { std::vector>> a8 = std::vector>>(N, @@ -33533,11 +32200,7 @@ class reduce_sum_m2_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { std::vector>> a8 = std::vector>>(N, @@ -33772,11 +32435,7 @@ class reduce_sum_m2_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "a8", "double", @@ -34551,10 +33210,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return reduce_sum_m2_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --print-cpp reduce_sum_m3.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace reduce_sum_m3_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -35843,14 +34511,8 @@ f1(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 171; return 0.0; @@ -35871,14 +34533,8 @@ f1a(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 173; return 0.0; @@ -35897,14 +34553,8 @@ f2(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 175; return 0.0; @@ -35923,14 +34573,8 @@ f3(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 177; return 0.0; @@ -35949,14 +34593,8 @@ f4(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 179; return 0.0; @@ -35980,14 +34618,8 @@ f5(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 181; return 0.0; @@ -36009,14 +34641,8 @@ f6(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 183; return 0.0; @@ -36038,14 +34664,8 @@ f7(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 185; return 0.0; @@ -36067,14 +34687,8 @@ f8(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 187; return 0.0; @@ -36092,14 +34706,8 @@ f9(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 189; return 0.0; @@ -36118,14 +34726,8 @@ f10(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 191; return 0.0; @@ -36147,14 +34749,8 @@ f11(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 193; return 0.0; @@ -36182,14 +34778,8 @@ f12(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 195; return 0.0; @@ -36213,14 +34803,8 @@ g1(const T0__& y_slice, const T1__& start, const T2__& end, const T3__& a, using local_scalar_t__ = stan::promote_args_t, T3__>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 197; return 0.0; @@ -36244,15 +34828,9 @@ g2(const T0__& y_slice, const T1__& start, const T2__& end, const T3__& using local_scalar_t__ = stan::promote_args_t, stan::base_type_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& a = stan::math::to_ref(a_arg__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 199; return 0.0; @@ -36276,15 +34854,9 @@ g3(const T0__& y_slice, const T1__& start, const T2__& end, const T3__& using local_scalar_t__ = stan::promote_args_t, stan::base_type_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& a = stan::math::to_ref(a_arg__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 201; return 0.0; @@ -36308,15 +34880,9 @@ g4(const T0__& y_slice, const T1__& start, const T2__& end, const T3__& using local_scalar_t__ = stan::promote_args_t, stan::base_type_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& a = stan::math::to_ref(a_arg__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 203; return 0.0; @@ -36343,14 +34909,8 @@ g5(const T0__& y_slice, const T1__& start, const T2__& end, const T3__& a, using local_scalar_t__ = stan::promote_args_t, stan::base_type_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 205; return 0.0; @@ -36375,14 +34935,8 @@ g6(const T0__& y_slice, const T1__& start, const T2__& end, const T3__& a, using local_scalar_t__ = stan::promote_args_t, stan::base_type_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 207; return 0.0; @@ -36407,14 +34961,8 @@ g7(const T0__& y_slice, const T1__& start, const T2__& end, const T3__& a, using local_scalar_t__ = stan::promote_args_t, stan::base_type_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 209; return 0.0; @@ -36439,14 +34987,8 @@ g8(const T0__& y_slice, const T1__& start, const T2__& end, const T3__& a, using local_scalar_t__ = stan::promote_args_t, stan::base_type_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 211; return 0.0; @@ -36476,14 +35018,8 @@ g9(const T0__& y_slice, const T1__& start, const T2__& end, const T3__& a, using local_scalar_t__ = stan::promote_args_t, stan::base_type_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 213; return 0.0; @@ -36511,14 +35047,8 @@ g10(const T0__& y_slice, const T1__& start, const T2__& end, const T3__& a, using local_scalar_t__ = stan::promote_args_t, stan::base_type_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 215; return 0.0; @@ -36546,14 +35076,8 @@ g11(const T0__& y_slice, const T1__& start, const T2__& end, const T3__& a, using local_scalar_t__ = stan::promote_args_t, stan::base_type_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 217; return 0.0; @@ -36581,14 +35105,8 @@ g12(const T0__& y_slice, const T1__& start, const T2__& end, const T3__& a, using local_scalar_t__ = stan::promote_args_t, stan::base_type_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 219; return 0.0; @@ -36712,17 +35230,11 @@ s(const T0__& y_slice, const T1__& start, const T2__& end, const T3__& a, stan::base_type_t, stan::base_type_t>>>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& c = stan::math::to_ref(c_arg__); const auto& d = stan::math::to_ref(d_arg__); const auto& e = stan::math::to_ref(e_arg__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 221; return stan::math::reduce_sum(y_slice, 1, pstream__, a, b, @@ -36736,14 +35248,8 @@ s(const T0__& y_slice, const T1__& start, const T2__& end, const T3__& a, double r(std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int N = std::numeric_limits::min(); current_statement__ = 224; @@ -37092,19 +35598,11 @@ class reduce_sum_m3_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "reduce_sum_m3_model_namespace::reduce_sum_m3_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__ = std::numeric_limits::min(); pos__ = 1; @@ -37680,15 +36178,9 @@ class reduce_sum_m3_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "reduce_sum_m3_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { std::vector y1 = std::vector(N, DUMMY_VAR__); @@ -37872,15 +36364,9 @@ class reduce_sum_m3_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "reduce_sum_m3_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { std::vector y1 = std::vector(N, DUMMY_VAR__); @@ -38065,25 +36551,13 @@ class reduce_sum_m3_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "reduce_sum_m3_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { std::vector y1 = std::vector(N, std::numeric_limits::quiet_NaN()); @@ -38370,11 +36844,7 @@ class reduce_sum_m3_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { std::vector y1 = std::vector(N, DUMMY_VAR__); @@ -38538,11 +37008,7 @@ class reduce_sum_m3_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "y1", "double", @@ -39225,10 +37691,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return reduce_sum_m3_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --print-cpp reject-exit.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace reject_exit_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -39251,19 +37726,11 @@ class reject_exit_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "reject_exit_model_namespace::reject_exit_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__ = std::numeric_limits::min(); pos__ = 1; @@ -39313,15 +37780,9 @@ class reject_exit_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "reject_exit_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ x = DUMMY_VAR__; current_statement__ = 1; @@ -39370,15 +37831,9 @@ class reject_exit_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "reject_exit_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ x = DUMMY_VAR__; current_statement__ = 1; @@ -39428,25 +37883,13 @@ class reject_exit_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "reject_exit_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { double x = std::numeric_limits::quiet_NaN(); current_statement__ = 1; @@ -39474,11 +37917,7 @@ class reject_exit_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { local_scalar_t__ x = DUMMY_VAR__; current_statement__ = 1; @@ -39495,11 +37934,7 @@ class reject_exit_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "x", "double", @@ -39645,10 +38080,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return reject_exit_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --print-cpp return-position-types.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace return_position_types_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -39689,14 +38133,8 @@ std::vector> foo(const T0__& a, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 5; return std::vector{0.1}; @@ -39713,14 +38151,8 @@ std::tuple>, baz(const T0__& a, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 7; return std::tuple, local_scalar_t__>( @@ -39737,14 +38169,8 @@ std::vector>> bar(const T0__& a, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 9; return std::vector>{stan::math::promote_scalar< @@ -39765,19 +38191,11 @@ class return_position_types_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; num_params_r__ = 1; } inline std::string model_name() const final { @@ -39801,15 +38219,9 @@ class return_position_types_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "return_position_types_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ a = DUMMY_VAR__; current_statement__ = 1; @@ -39850,15 +38262,9 @@ class return_position_types_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "return_position_types_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ a = DUMMY_VAR__; current_statement__ = 1; @@ -39900,25 +38306,13 @@ class return_position_types_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "return_position_types_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { double a = std::numeric_limits::quiet_NaN(); current_statement__ = 1; @@ -39946,11 +38340,7 @@ class return_position_types_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { local_scalar_t__ a = DUMMY_VAR__; current_statement__ = 1; @@ -39967,11 +38357,7 @@ class return_position_types_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "a", "double", @@ -40117,10 +38503,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return return_position_types_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --print-cpp self-assign.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace self_assign_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -40143,19 +38538,11 @@ class self_assign_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "self_assign_model_namespace::self_assign_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; num_params_r__ = 0U; } inline std::string model_name() const final { @@ -40179,15 +38566,9 @@ class self_assign_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "self_assign_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; lp_accum__.add(lp__); return lp_accum__.sum(); } @@ -40205,15 +38586,9 @@ class self_assign_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "self_assign_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; lp_accum__.add(lp__); return lp_accum__.sum(); } @@ -40232,25 +38607,13 @@ class self_assign_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "self_assign_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { if (stan::math::logical_negation( (stan::math::primitive_value(emit_transformed_parameters__) || @@ -40304,11 +38667,7 @@ class self_assign_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } template * = nullptr> inline void @@ -40317,11 +38676,7 @@ class self_assign_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } inline void get_param_names(std::vector& names__, const bool @@ -40488,6 +38843,9 @@ stan::math::profile_map& get_stan_profile_data() { return self_assign_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif Warning in 'self-assign.stan', line 4, column 2: Assignment of variable to itself. Warning in 'self-assign.stan', line 8, column 2: Assignment of variable to @@ -40497,6 +38855,12 @@ Warning in 'self-assign.stan', line 12, column 4: Assignment of variable to $ ../../../../../install/default/bin/stanc --print-cpp shadowing.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace shadowing_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -40593,15 +38957,9 @@ rhs(const T0__& t, const T1__& y_arg__, const T2__& alpha, std::ostream* using local_scalar_t__ = stan::promote_args_t, T2__>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& y = stan::math::to_ref(y_arg__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { Eigen::Matrix yp = Eigen::Matrix::Constant(1, DUMMY_VAR__); @@ -40625,19 +38983,11 @@ class shadowing_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "shadowing_model_namespace::shadowing_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__ = std::numeric_limits::min(); pos__ = 1; @@ -40695,15 +39045,9 @@ class shadowing_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "shadowing_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ e = DUMMY_VAR__; current_statement__ = 1; @@ -40878,15 +39222,9 @@ class shadowing_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "shadowing_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ e = DUMMY_VAR__; current_statement__ = 1; @@ -41062,25 +39400,13 @@ class shadowing_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "shadowing_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { double e = std::numeric_limits::quiet_NaN(); current_statement__ = 1; @@ -41300,11 +39626,7 @@ class shadowing_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { local_scalar_t__ e = DUMMY_VAR__; current_statement__ = 1; @@ -41459,11 +39781,7 @@ class shadowing_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "e", "double", @@ -42017,10 +40335,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return shadowing_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --print-cpp single-argument-lpmf.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace single_argument_lpmf_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -42072,11 +40399,7 @@ template ::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; return -(5); @@ -42090,11 +40413,7 @@ template ::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 3; return -(5); @@ -42110,11 +40429,7 @@ foo4_lp(const T0__& y, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 5; return -(5); @@ -42129,11 +40444,7 @@ template foo2_lpdf(const T0__& y, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 7; return -(5); @@ -42148,11 +40459,7 @@ template foo3_lpdf(const T0__& y, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 9; return -(5); @@ -42170,11 +40477,7 @@ foo5_lp(const T0__& y, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 11; return -(5); @@ -42191,19 +40494,11 @@ class single_argument_lpmf_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; num_params_r__ = 0U; } inline std::string model_name() const final { @@ -42227,15 +40522,9 @@ class single_argument_lpmf_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "single_argument_lpmf_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; lp_accum__.add(lp__); return lp_accum__.sum(); } @@ -42253,15 +40542,9 @@ class single_argument_lpmf_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "single_argument_lpmf_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; lp_accum__.add(lp__); return lp_accum__.sum(); } @@ -42280,25 +40563,13 @@ class single_argument_lpmf_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "single_argument_lpmf_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { if (stan::math::logical_negation( (stan::math::primitive_value(emit_transformed_parameters__) || @@ -42322,11 +40593,7 @@ class single_argument_lpmf_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } template * = nullptr> inline void @@ -42335,11 +40602,7 @@ class single_argument_lpmf_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } inline void get_param_names(std::vector& names__, const bool @@ -42472,10 +40735,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return single_argument_lpmf_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --print-cpp tilde-block.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace tilde_block_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -42498,19 +40770,11 @@ class tilde_block_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "tilde_block_model_namespace::tilde_block_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 7; context__.validate_dims("data initialization", "t", "int", @@ -42544,15 +40808,9 @@ class tilde_block_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "tilde_block_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ x = DUMMY_VAR__; current_statement__ = 1; @@ -42604,15 +40862,9 @@ class tilde_block_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "tilde_block_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ x = DUMMY_VAR__; current_statement__ = 1; @@ -42665,25 +40917,13 @@ class tilde_block_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "tilde_block_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { double x = std::numeric_limits::quiet_NaN(); current_statement__ = 1; @@ -42712,11 +40952,7 @@ class tilde_block_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { local_scalar_t__ x = DUMMY_VAR__; current_statement__ = 1; @@ -42733,11 +40969,7 @@ class tilde_block_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "x", "double", @@ -42883,10 +41115,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return tilde_block_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --print-cpp transform.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace transform_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -43023,19 +41264,11 @@ class transform_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "transform_model_namespace::transform_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__ = std::numeric_limits::min(); pos__ = 1; @@ -43334,15 +41567,9 @@ class transform_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "transform_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { std::vector p_1 = std::vector(k, DUMMY_VAR__); @@ -43816,15 +42043,9 @@ class transform_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "transform_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { std::vector p_1 = std::vector(k, DUMMY_VAR__); @@ -44299,25 +42520,13 @@ class transform_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "transform_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { std::vector p_1 = std::vector(k, std::numeric_limits::quiet_NaN()); @@ -44939,11 +43148,7 @@ class transform_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { std::vector p_1 = std::vector(k, DUMMY_VAR__); @@ -45157,11 +43362,7 @@ class transform_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "p_1", "double", @@ -46094,10 +44295,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return transform_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --print-cpp truncate.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace truncate_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -46134,19 +44344,11 @@ class truncate_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "truncate_model_namespace::truncate_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 19; context__.validate_dims("data initialization", "n", "int", @@ -46186,15 +44388,9 @@ class truncate_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "truncate_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ m = DUMMY_VAR__; current_statement__ = 1; @@ -46305,15 +44501,9 @@ class truncate_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "truncate_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ m = DUMMY_VAR__; current_statement__ = 1; @@ -46425,25 +44615,13 @@ class truncate_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "truncate_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { double m = std::numeric_limits::quiet_NaN(); current_statement__ = 1; @@ -46476,11 +44654,7 @@ class truncate_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { local_scalar_t__ m = DUMMY_VAR__; current_statement__ = 1; @@ -46501,11 +44675,7 @@ class truncate_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "m", "double", @@ -46661,10 +44831,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return truncate_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --print-cpp udf_tilde_stmt_conflict.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace udf_tilde_stmt_conflict_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -46686,14 +44865,8 @@ template normal(const T0__& a, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 3; return stan::math::square(a); @@ -46710,19 +44883,11 @@ class udf_tilde_stmt_conflict_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; num_params_r__ = 1; } inline std::string model_name() const final { @@ -46746,15 +44911,9 @@ class udf_tilde_stmt_conflict_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "udf_tilde_stmt_conflict_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ x = DUMMY_VAR__; current_statement__ = 1; @@ -46783,15 +44942,9 @@ class udf_tilde_stmt_conflict_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "udf_tilde_stmt_conflict_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ x = DUMMY_VAR__; current_statement__ = 1; @@ -46821,25 +44974,13 @@ class udf_tilde_stmt_conflict_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "udf_tilde_stmt_conflict_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { double x = std::numeric_limits::quiet_NaN(); current_statement__ = 1; @@ -46867,11 +45008,7 @@ class udf_tilde_stmt_conflict_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { local_scalar_t__ x = DUMMY_VAR__; current_statement__ = 1; @@ -46888,11 +45025,7 @@ class udf_tilde_stmt_conflict_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "x", "double", @@ -47038,10 +45171,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return udf_tilde_stmt_conflict_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --print-cpp user_constrain.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace user_constrain_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -47069,14 +45211,8 @@ stan::promote_args_t lb_constrain(const T0__& x, const T1__& y, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 3; return x; @@ -47093,19 +45229,11 @@ class user_constrain_model final : public model_base_crtp random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "user_constrain_model_namespace::user_constrain_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; num_params_r__ = 1; } inline std::string model_name() const final { @@ -47129,15 +45257,9 @@ class user_constrain_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "user_constrain_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ x = DUMMY_VAR__; current_statement__ = 1; @@ -47167,15 +45289,9 @@ class user_constrain_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "user_constrain_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ x = DUMMY_VAR__; current_statement__ = 1; @@ -47206,25 +45322,13 @@ class user_constrain_model final : public model_base_crtp stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "user_constrain_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { double x = std::numeric_limits::quiet_NaN(); current_statement__ = 1; @@ -47253,11 +45357,7 @@ class user_constrain_model final : public model_base_crtp stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { local_scalar_t__ x = DUMMY_VAR__; current_statement__ = 1; @@ -47274,11 +45374,7 @@ class user_constrain_model final : public model_base_crtp using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "x", "double", @@ -47424,10 +45520,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return user_constrain_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --print-cpp variable_named_context.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace variable_named_context_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -47451,19 +45556,11 @@ class variable_named_context_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__ = std::numeric_limits::min(); pos__ = 1; @@ -47521,15 +45618,9 @@ class variable_named_context_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "variable_named_context_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ mu = DUMMY_VAR__; current_statement__ = 1; @@ -47562,15 +45653,9 @@ class variable_named_context_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "variable_named_context_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ mu = DUMMY_VAR__; current_statement__ = 1; @@ -47604,25 +45689,13 @@ class variable_named_context_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "variable_named_context_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { double mu = std::numeric_limits::quiet_NaN(); current_statement__ = 1; @@ -47655,11 +45728,7 @@ class variable_named_context_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { local_scalar_t__ mu = DUMMY_VAR__; current_statement__ = 1; @@ -47680,11 +45749,7 @@ class variable_named_context_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "mu", "double", @@ -47840,10 +45905,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return variable_named_context_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --print-cpp vector_truncate.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace vector_truncate_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -47955,19 +46029,11 @@ class vector_truncate_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 87; context__.validate_dims("data initialization", "N", "int", @@ -48033,15 +46099,9 @@ class vector_truncate_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "vector_truncate_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ mu = DUMMY_VAR__; current_statement__ = 1; @@ -48556,15 +46616,9 @@ class vector_truncate_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "vector_truncate_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ mu = DUMMY_VAR__; current_statement__ = 1; @@ -49080,25 +47134,13 @@ class vector_truncate_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "vector_truncate_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { double mu = std::numeric_limits::quiet_NaN(); current_statement__ = 1; @@ -49144,11 +47186,7 @@ class vector_truncate_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { local_scalar_t__ mu = DUMMY_VAR__; current_statement__ = 1; @@ -49183,11 +47221,7 @@ class vector_truncate_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "mu", "double", @@ -49399,3 +47433,6 @@ stan::math::profile_map& get_stan_profile_data() { return vector_truncate_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif diff --git a/test/integration/good/code-gen/expressions/cpp.expected b/test/integration/good/code-gen/expressions/cpp.expected index a824234b5..e44014e5f 100644 --- a/test/integration/good/code-gen/expressions/cpp.expected +++ b/test/integration/good/code-gen/expressions/cpp.expected @@ -1,6 +1,12 @@ $ ../../../../../../install/default/bin/stanc --print-cpp operators.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace operators_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -36,19 +42,11 @@ class operators_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "operators_model_namespace::operators_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 12; context__.validate_dims("data initialization", "N", "int", @@ -100,15 +98,9 @@ class operators_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "operators_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix v = Eigen::Matrix::Constant(N, DUMMY_VAR__); @@ -142,15 +134,9 @@ class operators_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "operators_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix v = Eigen::Matrix::Constant(N, DUMMY_VAR__); @@ -185,25 +171,13 @@ class operators_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "operators_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix v = Eigen::Matrix::Constant(N, @@ -276,11 +250,7 @@ class operators_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { Eigen::Matrix v = Eigen::Matrix::Constant(N, DUMMY_VAR__); @@ -314,11 +284,7 @@ class operators_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "v", "double", @@ -581,10 +547,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return operators_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../../install/default/bin/stanc --print-cpp simple_function.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace simple_function_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -679,17 +654,11 @@ foo1(const T0__& a, const T1__& b, const T2__& c, const T3__& d_arg__, stan::base_type_t, stan::base_type_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& d = stan::math::to_ref(d_arg__); const auto& e = stan::math::to_ref(e_arg__); const auto& f = stan::math::to_ref(f_arg__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 5; return 5.0; @@ -715,15 +684,9 @@ foo2(const T0__& a_arg__, const T1__& b, const T2__& c, std::ostream* stan::base_type_t, stan::base_type_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& a = stan::math::to_ref(a_arg__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 7; return a; @@ -743,16 +706,10 @@ foo3(const T0__& a_arg__, const T1__& b_arg__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t, stan::base_type_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& a = stan::math::to_ref(a_arg__); const auto& b = stan::math::to_ref(b_arg__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 9; return b; @@ -772,16 +729,10 @@ add_udf(const T0__& a_arg__, const T1__& b_arg__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t, stan::base_type_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& a = stan::math::to_ref(a_arg__); const auto& b = stan::math::to_ref(b_arg__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 11; return stan::math::add(a, b); @@ -800,19 +751,11 @@ class simple_function_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__ = std::numeric_limits::min(); pos__ = 1; @@ -872,15 +815,9 @@ class simple_function_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "simple_function_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; lp_accum__.add(lp__); return lp_accum__.sum(); } @@ -898,15 +835,9 @@ class simple_function_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "simple_function_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; lp_accum__.add(lp__); return lp_accum__.sum(); } @@ -925,25 +856,13 @@ class simple_function_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "simple_function_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { if (stan::math::logical_negation( (stan::math::primitive_value(emit_transformed_parameters__) || @@ -967,11 +886,7 @@ class simple_function_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } template * = nullptr> inline void @@ -980,11 +895,7 @@ class simple_function_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } inline void get_param_names(std::vector& names__, const bool @@ -1117,10 +1028,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return simple_function_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../../install/default/bin/stanc --print-cpp ternary_if.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace ternary_if_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -1146,19 +1066,11 @@ class ternary_if_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "ternary_if_model_namespace::ternary_if_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 10; context__.validate_dims("data initialization", "y", "double", @@ -1192,15 +1104,9 @@ class ternary_if_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "ternary_if_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix a = Eigen::Matrix::Constant(2, DUMMY_VAR__); @@ -1270,15 +1176,9 @@ class ternary_if_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "ternary_if_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix a = Eigen::Matrix::Constant(2, DUMMY_VAR__); @@ -1349,25 +1249,13 @@ class ternary_if_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "ternary_if_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix a = Eigen::Matrix::Constant(2, @@ -1444,11 +1332,7 @@ class ternary_if_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { Eigen::Matrix a = Eigen::Matrix::Constant(2, DUMMY_VAR__); @@ -1484,11 +1368,7 @@ class ternary_if_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "a", "double", @@ -1738,3 +1618,6 @@ stan::math::profile_map& get_stan_profile_data() { return ternary_if_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif diff --git a/test/integration/good/code-gen/lir.expected b/test/integration/good/code-gen/lir.expected index 7cec74102..a0e85ab2d 100644 --- a/test/integration/good/code-gen/lir.expected +++ b/test/integration/good/code-gen/lir.expected @@ -1,6 +1,12 @@ $ ../../../../../install/default/bin/stanc --debug-lir mother.stan ((GlobalComment "Code generated by %%NAME%% %%VERSION%%") (Preprocessor (Include stan/model/model_header.hpp)) + (Preprocessor + (IfNDef _MSC_VER + ((GlobalComment "Disable warnings for unused variables in our generated code.") + (Preprocessor (Pragma "GCC diagnostic push")) + (Preprocessor (Pragma "GCC diagnostic ignored \"-Wunused-but-set-variable\"")) + (Preprocessor (Pragma "GCC diagnostic ignored \"-Wunused-variable\""))))) (Namespace mother_model_namespace ((GlobalUsing stan::model::model_base_crtp ()) (GlobalUsing "namespace stan::math" ()) (GlobalVariableDefn @@ -2327,18 +2333,13 @@ (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) - (Comment "suppress unused var warning") - (Expression (Cast Void (Var current_statement__))) (VariableDefn ((static true) (constexpr true) (type_ (TypeLiteral bool)) (name propto__) (init (Assignment (Literal true))))) - (Comment "suppress unused var warning") (Expression (Cast Void (Var propto__))) (VariableDefn ((static false) (constexpr false) (type_ (TypeLiteral local_scalar_t__)) (name DUMMY_VAR__) (init (Construction ((FunCall std::numeric_limits::quiet_NaN () ())))))) - (Comment "suppress unused var warning") - (Expression (Cast Void (Var DUMMY_VAR__))) (TryCatch ((Expression (Assign (Var current_statement__) (Literal 594))) (IfElse (FunCall stan::math::logical_eq () ((Var n) (Literal 0))) @@ -2392,18 +2393,13 @@ (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) - (Comment "suppress unused var warning") - (Expression (Cast Void (Var current_statement__))) (VariableDefn ((static true) (constexpr true) (type_ (TypeLiteral bool)) (name propto__) (init (Assignment (Literal true))))) - (Comment "suppress unused var warning") (Expression (Cast Void (Var propto__))) (VariableDefn ((static false) (constexpr false) (type_ (TypeLiteral local_scalar_t__)) (name DUMMY_VAR__) (init (Construction ((FunCall std::numeric_limits::quiet_NaN () ())))))) - (Comment "suppress unused var warning") - (Expression (Cast Void (Var DUMMY_VAR__))) (TryCatch ((VariableDefn ((static false) (constexpr false) @@ -2459,18 +2455,13 @@ (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) - (Comment "suppress unused var warning") - (Expression (Cast Void (Var current_statement__))) (VariableDefn ((static true) (constexpr true) (type_ (TypeLiteral bool)) (name propto__) (init (Assignment (Literal true))))) - (Comment "suppress unused var warning") (Expression (Cast Void (Var propto__))) (VariableDefn ((static false) (constexpr false) (type_ (TypeLiteral local_scalar_t__)) (name DUMMY_VAR__) (init (Construction ((FunCall std::numeric_limits::quiet_NaN () ())))))) - (Comment "suppress unused var warning") - (Expression (Cast Void (Var DUMMY_VAR__))) (TryCatch ((Expression (Assign (Var current_statement__) (Literal 602))) (Return ((Literal 0.0)))) @@ -2496,18 +2487,13 @@ (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) - (Comment "suppress unused var warning") - (Expression (Cast Void (Var current_statement__))) (VariableDefn ((static true) (constexpr true) (type_ (TypeLiteral bool)) (name propto__) (init (Assignment (Literal true))))) - (Comment "suppress unused var warning") (Expression (Cast Void (Var propto__))) (VariableDefn ((static false) (constexpr false) (type_ (TypeLiteral local_scalar_t__)) (name DUMMY_VAR__) (init (Construction ((FunCall std::numeric_limits::quiet_NaN () ())))))) - (Comment "suppress unused var warning") - (Expression (Cast Void (Var DUMMY_VAR__))) (TryCatch ((Expression (Assign (Var current_statement__) (Literal 604))) (Return ((Literal 1.0)))) @@ -2538,18 +2524,13 @@ (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) - (Comment "suppress unused var warning") - (Expression (Cast Void (Var current_statement__))) (VariableDefn ((static true) (constexpr true) (type_ (TypeLiteral bool)) (name propto__) (init (Assignment (Literal true))))) - (Comment "suppress unused var warning") (Expression (Cast Void (Var propto__))) (VariableDefn ((static false) (constexpr false) (type_ (TypeLiteral local_scalar_t__)) (name DUMMY_VAR__) (init (Construction ((FunCall std::numeric_limits::quiet_NaN () ())))))) - (Comment "suppress unused var warning") - (Expression (Cast Void (Var DUMMY_VAR__))) (TryCatch ((Expression (Assign (Var current_statement__) (Literal 606))) (Return ((Literal 2.0)))) @@ -2576,14 +2557,10 @@ (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) - (Comment "suppress unused var warning") - (Expression (Cast Void (Var current_statement__))) (VariableDefn ((static false) (constexpr false) (type_ (TypeLiteral local_scalar_t__)) (name DUMMY_VAR__) (init (Construction ((FunCall std::numeric_limits::quiet_NaN () ())))))) - (Comment "suppress unused var warning") - (Expression (Cast Void (Var DUMMY_VAR__))) (TryCatch ((Expression (Assign (Var current_statement__) (Literal 608))) (Return ((Literal 1.0)))) @@ -2610,18 +2587,13 @@ (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) - (Comment "suppress unused var warning") - (Expression (Cast Void (Var current_statement__))) (VariableDefn ((static true) (constexpr true) (type_ (TypeLiteral bool)) (name propto__) (init (Assignment (Literal true))))) - (Comment "suppress unused var warning") (Expression (Cast Void (Var propto__))) (VariableDefn ((static false) (constexpr false) (type_ (TypeLiteral local_scalar_t__)) (name DUMMY_VAR__) (init (Construction ((FunCall std::numeric_limits::quiet_NaN () ())))))) - (Comment "suppress unused var warning") - (Expression (Cast Void (Var DUMMY_VAR__))) (TryCatch ((Expression (Assign (Var current_statement__) (Literal 610))) (Return ((Literal 1.0)))) @@ -2648,18 +2620,13 @@ (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) - (Comment "suppress unused var warning") - (Expression (Cast Void (Var current_statement__))) (VariableDefn ((static true) (constexpr true) (type_ (TypeLiteral bool)) (name propto__) (init (Assignment (Literal true))))) - (Comment "suppress unused var warning") (Expression (Cast Void (Var propto__))) (VariableDefn ((static false) (constexpr false) (type_ (TypeLiteral local_scalar_t__)) (name DUMMY_VAR__) (init (Construction ((FunCall std::numeric_limits::quiet_NaN () ())))))) - (Comment "suppress unused var warning") - (Expression (Cast Void (Var DUMMY_VAR__))) (TryCatch ((Expression (Assign (Var current_statement__) (Literal 612))) (Return ((Literal 1.0)))) @@ -2691,18 +2658,13 @@ (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) - (Comment "suppress unused var warning") - (Expression (Cast Void (Var current_statement__))) (VariableDefn ((static true) (constexpr true) (type_ (TypeLiteral bool)) (name propto__) (init (Assignment (Literal true))))) - (Comment "suppress unused var warning") (Expression (Cast Void (Var propto__))) (VariableDefn ((static false) (constexpr false) (type_ (TypeLiteral local_scalar_t__)) (name DUMMY_VAR__) (init (Construction ((FunCall std::numeric_limits::quiet_NaN () ())))))) - (Comment "suppress unused var warning") - (Expression (Cast Void (Var DUMMY_VAR__))) (TryCatch ((Expression (Assign (Var current_statement__) (Literal 614))) (Return @@ -2729,14 +2691,10 @@ (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) - (Comment "suppress unused var warning") - (Expression (Cast Void (Var current_statement__))) (VariableDefn ((static false) (constexpr false) (type_ (TypeLiteral local_scalar_t__)) (name DUMMY_VAR__) (init (Construction ((FunCall std::numeric_limits::quiet_NaN () ())))))) - (Comment "suppress unused var warning") - (Expression (Cast Void (Var DUMMY_VAR__))) (TryCatch ((Expression (Assign (Var current_statement__) (Literal 616))) (Expression @@ -2768,18 +2726,13 @@ (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) - (Comment "suppress unused var warning") - (Expression (Cast Void (Var current_statement__))) (VariableDefn ((static true) (constexpr true) (type_ (TypeLiteral bool)) (name propto__) (init (Assignment (Literal true))))) - (Comment "suppress unused var warning") (Expression (Cast Void (Var propto__))) (VariableDefn ((static false) (constexpr false) (type_ (TypeLiteral local_scalar_t__)) (name DUMMY_VAR__) (init (Construction ((FunCall std::numeric_limits::quiet_NaN () ())))))) - (Comment "suppress unused var warning") - (Expression (Cast Void (Var DUMMY_VAR__))) (TryCatch ((Expression (Assign (Var current_statement__) (Literal 620))) (While (Literal 1) (Block (Break))) @@ -3113,18 +3066,13 @@ (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) - (Comment "suppress unused var warning") - (Expression (Cast Void (Var current_statement__))) (VariableDefn ((static true) (constexpr true) (type_ (TypeLiteral bool)) (name propto__) (init (Assignment (Literal true))))) - (Comment "suppress unused var warning") (Expression (Cast Void (Var propto__))) (VariableDefn ((static false) (constexpr false) (type_ (TypeLiteral local_scalar_t__)) (name DUMMY_VAR__) (init (Construction ((FunCall std::numeric_limits::quiet_NaN () ())))))) - (Comment "suppress unused var warning") - (Expression (Cast Void (Var DUMMY_VAR__))) (TryCatch ((VariableDefn ((static false) (constexpr false) (type_ (StdVector Int)) @@ -3178,18 +3126,13 @@ (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) - (Comment "suppress unused var warning") - (Expression (Cast Void (Var current_statement__))) (VariableDefn ((static true) (constexpr true) (type_ (TypeLiteral bool)) (name propto__) (init (Assignment (Literal true))))) - (Comment "suppress unused var warning") (Expression (Cast Void (Var propto__))) (VariableDefn ((static false) (constexpr false) (type_ (TypeLiteral local_scalar_t__)) (name DUMMY_VAR__) (init (Construction ((FunCall std::numeric_limits::quiet_NaN () ())))))) - (Comment "suppress unused var warning") - (Expression (Cast Void (Var DUMMY_VAR__))) (TryCatch ((Expression (Assign (Var current_statement__) (Literal 707))) (Return ((FunCall stan::math::rep_array () ((Var t) (Var n)))))) @@ -3216,14 +3159,10 @@ (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) - (Comment "suppress unused var warning") - (Expression (Cast Void (Var current_statement__))) (VariableDefn ((static false) (constexpr false) (type_ (TypeLiteral local_scalar_t__)) (name DUMMY_VAR__) (init (Construction ((FunCall std::numeric_limits::quiet_NaN () ())))))) - (Comment "suppress unused var warning") - (Expression (Cast Void (Var DUMMY_VAR__))) (TryCatch ((Expression (Assign (Var current_statement__) (Literal 709))) (Return @@ -3254,18 +3193,13 @@ (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) - (Comment "suppress unused var warning") - (Expression (Cast Void (Var current_statement__))) (VariableDefn ((static true) (constexpr true) (type_ (TypeLiteral bool)) (name propto__) (init (Assignment (Literal true))))) - (Comment "suppress unused var warning") (Expression (Cast Void (Var propto__))) (VariableDefn ((static false) (constexpr false) (type_ (TypeLiteral local_scalar_t__)) (name DUMMY_VAR__) (init (Construction ((FunCall std::numeric_limits::quiet_NaN () ())))))) - (Comment "suppress unused var warning") - (Expression (Cast Void (Var DUMMY_VAR__))) (TryCatch ((Expression (Assign (Var current_statement__) (Literal 711))) (Block @@ -3324,18 +3258,13 @@ (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) - (Comment "suppress unused var warning") - (Expression (Cast Void (Var current_statement__))) (VariableDefn ((static true) (constexpr true) (type_ (TypeLiteral bool)) (name propto__) (init (Assignment (Literal true))))) - (Comment "suppress unused var warning") (Expression (Cast Void (Var propto__))) (VariableDefn ((static false) (constexpr false) (type_ (TypeLiteral local_scalar_t__)) (name DUMMY_VAR__) (init (Construction ((FunCall std::numeric_limits::quiet_NaN () ())))))) - (Comment "suppress unused var warning") - (Expression (Cast Void (Var DUMMY_VAR__))) (TryCatch ((VariableDefn ((static false) (constexpr false) (type_ (TypeLiteral local_scalar_t__)) @@ -3453,8 +3382,6 @@ (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) - (Comment "suppress unused var warning") - (Expression (Cast Void (Var current_statement__))) (VariableDefn ((static false) (constexpr false) (type_ (Const (Ref Auto))) (name shared_params) @@ -3466,13 +3393,10 @@ (VariableDefn ((static true) (constexpr true) (type_ (TypeLiteral bool)) (name propto__) (init (Assignment (Literal true))))) - (Comment "suppress unused var warning") (Expression (Cast Void (Var propto__))) (VariableDefn ((static false) (constexpr false) (type_ (TypeLiteral local_scalar_t__)) (name DUMMY_VAR__) (init (Construction ((FunCall std::numeric_limits::quiet_NaN () ())))))) - (Comment "suppress unused var warning") - (Expression (Cast Void (Var DUMMY_VAR__))) (TryCatch ((Expression (Assign (Var current_statement__) (Literal 723))) (Return @@ -3522,18 +3446,13 @@ (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) - (Comment "suppress unused var warning") - (Expression (Cast Void (Var current_statement__))) (VariableDefn ((static true) (constexpr true) (type_ (TypeLiteral bool)) (name propto__) (init (Assignment (Literal true))))) - (Comment "suppress unused var warning") (Expression (Cast Void (Var propto__))) (VariableDefn ((static false) (constexpr false) (type_ (TypeLiteral local_scalar_t__)) (name DUMMY_VAR__) (init (Construction ((FunCall std::numeric_limits::quiet_NaN () ())))))) - (Comment "suppress unused var warning") - (Expression (Cast Void (Var DUMMY_VAR__))) (TryCatch ((Expression (Assign (Var current_statement__) (Literal 725))) (Return ((Var x1)))) @@ -3582,14 +3501,10 @@ (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) - (Comment "suppress unused var warning") - (Expression (Cast Void (Var current_statement__))) (VariableDefn ((static false) (constexpr false) (type_ (TypeLiteral local_scalar_t__)) (name DUMMY_VAR__) (init (Construction ((FunCall std::numeric_limits::quiet_NaN () ())))))) - (Comment "suppress unused var warning") - (Expression (Cast Void (Var DUMMY_VAR__))) (TryCatch ((Expression (Assign (Var current_statement__) (Literal 727))) (Return ((Var x1)))) @@ -3624,8 +3539,6 @@ (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) - (Comment "suppress unused var warning") - (Expression (Cast Void (Var current_statement__))) (VariableDefn ((static false) (constexpr false) (type_ (Const (Ref Auto))) (name mat) @@ -3633,13 +3546,10 @@ (VariableDefn ((static true) (constexpr true) (type_ (TypeLiteral bool)) (name propto__) (init (Assignment (Literal true))))) - (Comment "suppress unused var warning") (Expression (Cast Void (Var propto__))) (VariableDefn ((static false) (constexpr false) (type_ (TypeLiteral local_scalar_t__)) (name DUMMY_VAR__) (init (Construction ((FunCall std::numeric_limits::quiet_NaN () ())))))) - (Comment "suppress unused var warning") - (Expression (Cast Void (Var DUMMY_VAR__))) (TryCatch ((Expression (Assign (Var current_statement__) (Literal 729))) (Expression @@ -3781,8 +3691,6 @@ (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) - (Comment "suppress unused var warning") - (Expression (Cast Void (Var current_statement__))) (VariableDefn ((static false) (constexpr false) (type_ (Const (Ref Auto))) (name a7) (init (Assignment (FunCall stan::math::to_ref () ((Var a7_arg__))))))) @@ -3793,13 +3701,10 @@ (VariableDefn ((static true) (constexpr true) (type_ (TypeLiteral bool)) (name propto__) (init (Assignment (Literal true))))) - (Comment "suppress unused var warning") (Expression (Cast Void (Var propto__))) (VariableDefn ((static false) (constexpr false) (type_ (TypeLiteral local_scalar_t__)) (name DUMMY_VAR__) (init (Construction ((FunCall std::numeric_limits::quiet_NaN () ())))))) - (Comment "suppress unused var warning") - (Expression (Cast Void (Var DUMMY_VAR__))) (TryCatch ((Expression (Assign (Var current_statement__) (Literal 737))) (IfElse (Var pstream__) @@ -3902,8 +3807,6 @@ (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) - (Comment "suppress unused var warning") - (Expression (Cast Void (Var current_statement__))) (VariableDefn ((static false) (constexpr false) (type_ (Const (Ref Auto))) (name a7) (init (Assignment (FunCall stan::math::to_ref () ((Var a7_arg__))))))) @@ -3914,13 +3817,10 @@ (VariableDefn ((static true) (constexpr true) (type_ (TypeLiteral bool)) (name propto__) (init (Assignment (Literal true))))) - (Comment "suppress unused var warning") (Expression (Cast Void (Var propto__))) (VariableDefn ((static false) (constexpr false) (type_ (TypeLiteral local_scalar_t__)) (name DUMMY_VAR__) (init (Construction ((FunCall std::numeric_limits::quiet_NaN () ())))))) - (Comment "suppress unused var warning") - (Expression (Cast Void (Var DUMMY_VAR__))) (TryCatch ((Expression (Assign (Var current_statement__) (Literal 739))) (Return ((Var a1)))) @@ -4018,8 +3918,6 @@ (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) - (Comment "suppress unused var warning") - (Expression (Cast Void (Var current_statement__))) (VariableDefn ((static false) (constexpr false) (type_ (Const (Ref Auto))) (name a7) (init (Assignment (FunCall stan::math::to_ref () ((Var a7_arg__))))))) @@ -4030,13 +3928,10 @@ (VariableDefn ((static true) (constexpr true) (type_ (TypeLiteral bool)) (name propto__) (init (Assignment (Literal true))))) - (Comment "suppress unused var warning") (Expression (Cast Void (Var propto__))) (VariableDefn ((static false) (constexpr false) (type_ (TypeLiteral local_scalar_t__)) (name DUMMY_VAR__) (init (Construction ((FunCall std::numeric_limits::quiet_NaN () ())))))) - (Comment "suppress unused var warning") - (Expression (Cast Void (Var DUMMY_VAR__))) (TryCatch ((Expression (Assign (Var current_statement__) (Literal 741))) (Return ((Var a2)))) @@ -4134,8 +4029,6 @@ (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) - (Comment "suppress unused var warning") - (Expression (Cast Void (Var current_statement__))) (VariableDefn ((static false) (constexpr false) (type_ (Const (Ref Auto))) (name a7) (init (Assignment (FunCall stan::math::to_ref () ((Var a7_arg__))))))) @@ -4146,13 +4039,10 @@ (VariableDefn ((static true) (constexpr true) (type_ (TypeLiteral bool)) (name propto__) (init (Assignment (Literal true))))) - (Comment "suppress unused var warning") (Expression (Cast Void (Var propto__))) (VariableDefn ((static false) (constexpr false) (type_ (TypeLiteral local_scalar_t__)) (name DUMMY_VAR__) (init (Construction ((FunCall std::numeric_limits::quiet_NaN () ())))))) - (Comment "suppress unused var warning") - (Expression (Cast Void (Var DUMMY_VAR__))) (TryCatch ((Expression (Assign (Var current_statement__) (Literal 743))) (Return ((Var a3)))) @@ -4262,8 +4152,6 @@ (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) - (Comment "suppress unused var warning") - (Expression (Cast Void (Var current_statement__))) (VariableDefn ((static false) (constexpr false) (type_ (Const (Ref Auto))) (name a7) (init (Assignment (FunCall stan::math::to_ref () ((Var a7_arg__))))))) @@ -4274,13 +4162,10 @@ (VariableDefn ((static true) (constexpr true) (type_ (TypeLiteral bool)) (name propto__) (init (Assignment (Literal true))))) - (Comment "suppress unused var warning") (Expression (Cast Void (Var propto__))) (VariableDefn ((static false) (constexpr false) (type_ (TypeLiteral local_scalar_t__)) (name DUMMY_VAR__) (init (Construction ((FunCall std::numeric_limits::quiet_NaN () ())))))) - (Comment "suppress unused var warning") - (Expression (Cast Void (Var DUMMY_VAR__))) (TryCatch ((Expression (Assign (Var current_statement__) (Literal 745))) (Return ((Var a4)))) @@ -4391,8 +4276,6 @@ (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) - (Comment "suppress unused var warning") - (Expression (Cast Void (Var current_statement__))) (VariableDefn ((static false) (constexpr false) (type_ (Const (Ref Auto))) (name a7) (init (Assignment (FunCall stan::math::to_ref () ((Var a7_arg__))))))) @@ -4403,13 +4286,10 @@ (VariableDefn ((static true) (constexpr true) (type_ (TypeLiteral bool)) (name propto__) (init (Assignment (Literal true))))) - (Comment "suppress unused var warning") (Expression (Cast Void (Var propto__))) (VariableDefn ((static false) (constexpr false) (type_ (TypeLiteral local_scalar_t__)) (name DUMMY_VAR__) (init (Construction ((FunCall std::numeric_limits::quiet_NaN () ())))))) - (Comment "suppress unused var warning") - (Expression (Cast Void (Var DUMMY_VAR__))) (TryCatch ((Expression (Assign (Var current_statement__) (Literal 747))) (Return ((Var a5)))) @@ -4521,8 +4401,6 @@ (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) - (Comment "suppress unused var warning") - (Expression (Cast Void (Var current_statement__))) (VariableDefn ((static false) (constexpr false) (type_ (Const (Ref Auto))) (name a7) (init (Assignment (FunCall stan::math::to_ref () ((Var a7_arg__))))))) @@ -4533,13 +4411,10 @@ (VariableDefn ((static true) (constexpr true) (type_ (TypeLiteral bool)) (name propto__) (init (Assignment (Literal true))))) - (Comment "suppress unused var warning") (Expression (Cast Void (Var propto__))) (VariableDefn ((static false) (constexpr false) (type_ (TypeLiteral local_scalar_t__)) (name DUMMY_VAR__) (init (Construction ((FunCall std::numeric_limits::quiet_NaN () ())))))) - (Comment "suppress unused var warning") - (Expression (Cast Void (Var DUMMY_VAR__))) (TryCatch ((Expression (Assign (Var current_statement__) (Literal 749))) (Return ((Var a6)))) @@ -4651,8 +4526,6 @@ (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) - (Comment "suppress unused var warning") - (Expression (Cast Void (Var current_statement__))) (VariableDefn ((static false) (constexpr false) (type_ (Const (Ref Auto))) (name a7) (init (Assignment (FunCall stan::math::to_ref () ((Var a7_arg__))))))) @@ -4663,13 +4536,10 @@ (VariableDefn ((static true) (constexpr true) (type_ (TypeLiteral bool)) (name propto__) (init (Assignment (Literal true))))) - (Comment "suppress unused var warning") (Expression (Cast Void (Var propto__))) (VariableDefn ((static false) (constexpr false) (type_ (TypeLiteral local_scalar_t__)) (name DUMMY_VAR__) (init (Construction ((FunCall std::numeric_limits::quiet_NaN () ())))))) - (Comment "suppress unused var warning") - (Expression (Cast Void (Var DUMMY_VAR__))) (TryCatch ((Expression (Assign (Var current_statement__) (Literal 751))) (Return ((Var a7)))) @@ -4782,8 +4652,6 @@ (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) - (Comment "suppress unused var warning") - (Expression (Cast Void (Var current_statement__))) (VariableDefn ((static false) (constexpr false) (type_ (Const (Ref Auto))) (name a7) (init (Assignment (FunCall stan::math::to_ref () ((Var a7_arg__))))))) @@ -4794,13 +4662,10 @@ (VariableDefn ((static true) (constexpr true) (type_ (TypeLiteral bool)) (name propto__) (init (Assignment (Literal true))))) - (Comment "suppress unused var warning") (Expression (Cast Void (Var propto__))) (VariableDefn ((static false) (constexpr false) (type_ (TypeLiteral local_scalar_t__)) (name DUMMY_VAR__) (init (Construction ((FunCall std::numeric_limits::quiet_NaN () ())))))) - (Comment "suppress unused var warning") - (Expression (Cast Void (Var DUMMY_VAR__))) (TryCatch ((Expression (Assign (Var current_statement__) (Literal 753))) (Return ((Var a8)))) @@ -4914,8 +4779,6 @@ (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) - (Comment "suppress unused var warning") - (Expression (Cast Void (Var current_statement__))) (VariableDefn ((static false) (constexpr false) (type_ (Const (Ref Auto))) (name a7) (init (Assignment (FunCall stan::math::to_ref () ((Var a7_arg__))))))) @@ -4926,13 +4789,10 @@ (VariableDefn ((static true) (constexpr true) (type_ (TypeLiteral bool)) (name propto__) (init (Assignment (Literal true))))) - (Comment "suppress unused var warning") (Expression (Cast Void (Var propto__))) (VariableDefn ((static false) (constexpr false) (type_ (TypeLiteral local_scalar_t__)) (name DUMMY_VAR__) (init (Construction ((FunCall std::numeric_limits::quiet_NaN () ())))))) - (Comment "suppress unused var warning") - (Expression (Cast Void (Var DUMMY_VAR__))) (TryCatch ((Expression (Assign (Var current_statement__) (Literal 755))) (Return ((Var a9)))) @@ -5044,8 +4904,6 @@ (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) - (Comment "suppress unused var warning") - (Expression (Cast Void (Var current_statement__))) (VariableDefn ((static false) (constexpr false) (type_ (Const (Ref Auto))) (name a7) (init (Assignment (FunCall stan::math::to_ref () ((Var a7_arg__))))))) @@ -5056,13 +4914,10 @@ (VariableDefn ((static true) (constexpr true) (type_ (TypeLiteral bool)) (name propto__) (init (Assignment (Literal true))))) - (Comment "suppress unused var warning") (Expression (Cast Void (Var propto__))) (VariableDefn ((static false) (constexpr false) (type_ (TypeLiteral local_scalar_t__)) (name DUMMY_VAR__) (init (Construction ((FunCall std::numeric_limits::quiet_NaN () ())))))) - (Comment "suppress unused var warning") - (Expression (Cast Void (Var DUMMY_VAR__))) (TryCatch ((Expression (Assign (Var current_statement__) (Literal 757))) (Return ((Var a10)))) @@ -5175,8 +5030,6 @@ (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) - (Comment "suppress unused var warning") - (Expression (Cast Void (Var current_statement__))) (VariableDefn ((static false) (constexpr false) (type_ (Const (Ref Auto))) (name a7) (init (Assignment (FunCall stan::math::to_ref () ((Var a7_arg__))))))) @@ -5187,13 +5040,10 @@ (VariableDefn ((static true) (constexpr true) (type_ (TypeLiteral bool)) (name propto__) (init (Assignment (Literal true))))) - (Comment "suppress unused var warning") (Expression (Cast Void (Var propto__))) (VariableDefn ((static false) (constexpr false) (type_ (TypeLiteral local_scalar_t__)) (name DUMMY_VAR__) (init (Construction ((FunCall std::numeric_limits::quiet_NaN () ())))))) - (Comment "suppress unused var warning") - (Expression (Cast Void (Var DUMMY_VAR__))) (TryCatch ((Expression (Assign (Var current_statement__) (Literal 759))) (Return ((Var a11)))) @@ -5307,8 +5157,6 @@ (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) - (Comment "suppress unused var warning") - (Expression (Cast Void (Var current_statement__))) (VariableDefn ((static false) (constexpr false) (type_ (Const (Ref Auto))) (name a7) (init (Assignment (FunCall stan::math::to_ref () ((Var a7_arg__))))))) @@ -5319,13 +5167,10 @@ (VariableDefn ((static true) (constexpr true) (type_ (TypeLiteral bool)) (name propto__) (init (Assignment (Literal true))))) - (Comment "suppress unused var warning") (Expression (Cast Void (Var propto__))) (VariableDefn ((static false) (constexpr false) (type_ (TypeLiteral local_scalar_t__)) (name DUMMY_VAR__) (init (Construction ((FunCall std::numeric_limits::quiet_NaN () ())))))) - (Comment "suppress unused var warning") - (Expression (Cast Void (Var DUMMY_VAR__))) (TryCatch ((Expression (Assign (Var current_statement__) (Literal 761))) (Return ((Var a12)))) @@ -5343,18 +5188,13 @@ (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) - (Comment "suppress unused var warning") - (Expression (Cast Void (Var current_statement__))) (VariableDefn ((static true) (constexpr true) (type_ (TypeLiteral bool)) (name propto__) (init (Assignment (Literal true))))) - (Comment "suppress unused var warning") (Expression (Cast Void (Var propto__))) (VariableDefn ((static false) (constexpr false) (type_ (TypeLiteral local_scalar_t__)) (name DUMMY_VAR__) (init (Construction ((FunCall std::numeric_limits::quiet_NaN () ())))))) - (Comment "suppress unused var warning") - (Expression (Cast Void (Var DUMMY_VAR__))) (TryCatch ((VariableDefn ((static false) (constexpr false) (type_ Int) (name a) @@ -5409,18 +5249,13 @@ (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) - (Comment "suppress unused var warning") - (Expression (Cast Void (Var current_statement__))) (VariableDefn ((static true) (constexpr true) (type_ (TypeLiteral bool)) (name propto__) (init (Assignment (Literal true))))) - (Comment "suppress unused var warning") (Expression (Cast Void (Var propto__))) (VariableDefn ((static false) (constexpr false) (type_ (TypeLiteral local_scalar_t__)) (name DUMMY_VAR__) (init (Construction ((FunCall std::numeric_limits::quiet_NaN () ())))))) - (Comment "suppress unused var warning") - (Expression (Cast Void (Var DUMMY_VAR__))) (TryCatch ((Expression (Assign (Var current_statement__) (Literal 769))) (Return @@ -5465,18 +5300,13 @@ (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) - (Comment "suppress unused var warning") - (Expression (Cast Void (Var current_statement__))) (VariableDefn ((static true) (constexpr true) (type_ (TypeLiteral bool)) (name propto__) (init (Assignment (Literal true))))) - (Comment "suppress unused var warning") (Expression (Cast Void (Var propto__))) (VariableDefn ((static false) (constexpr false) (type_ (TypeLiteral local_scalar_t__)) (name DUMMY_VAR__) (init (Construction ((FunCall std::numeric_limits::quiet_NaN () ())))))) - (Comment "suppress unused var warning") - (Expression (Cast Void (Var DUMMY_VAR__))) (TryCatch ((Expression (Assign (Var current_statement__) (Literal 771))) (Return @@ -5511,18 +5341,13 @@ (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) - (Comment "suppress unused var warning") - (Expression (Cast Void (Var current_statement__))) (VariableDefn ((static true) (constexpr true) (type_ (TypeLiteral bool)) (name propto__) (init (Assignment (Literal true))))) - (Comment "suppress unused var warning") (Expression (Cast Void (Var propto__))) (VariableDefn ((static false) (constexpr false) (type_ (TypeLiteral local_scalar_t__)) (name DUMMY_VAR__) (init (Construction ((FunCall std::numeric_limits::quiet_NaN () ())))))) - (Comment "suppress unused var warning") - (Expression (Cast Void (Var DUMMY_VAR__))) (TryCatch ((VariableDefn ((static false) (constexpr false) @@ -5565,18 +5390,13 @@ (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) - (Comment "suppress unused var warning") - (Expression (Cast Void (Var current_statement__))) (VariableDefn ((static true) (constexpr true) (type_ (TypeLiteral bool)) (name propto__) (init (Assignment (Literal true))))) - (Comment "suppress unused var warning") (Expression (Cast Void (Var propto__))) (VariableDefn ((static false) (constexpr false) (type_ (TypeLiteral local_scalar_t__)) (name DUMMY_VAR__) (init (Construction ((FunCall std::numeric_limits::quiet_NaN () ())))))) - (Comment "suppress unused var warning") - (Expression (Cast Void (Var DUMMY_VAR__))) (TryCatch ((VariableDefn ((static false) (constexpr false) @@ -5650,8 +5470,6 @@ (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) - (Comment "suppress unused var warning") - (Expression (Cast Void (Var current_statement__))) (VariableDefn ((static false) (constexpr false) (type_ (Const (Ref Auto))) (name x) (init (Assignment (FunCall stan::math::to_ref () ((Var x_arg__))))))) @@ -5661,13 +5479,10 @@ (VariableDefn ((static true) (constexpr true) (type_ (TypeLiteral bool)) (name propto__) (init (Assignment (Literal true))))) - (Comment "suppress unused var warning") (Expression (Cast Void (Var propto__))) (VariableDefn ((static false) (constexpr false) (type_ (TypeLiteral local_scalar_t__)) (name DUMMY_VAR__) (init (Construction ((FunCall std::numeric_limits::quiet_NaN () ())))))) - (Comment "suppress unused var warning") - (Expression (Cast Void (Var DUMMY_VAR__))) (TryCatch ((VariableDefn ((static false) (constexpr false) @@ -5745,8 +5560,6 @@ (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) - (Comment "suppress unused var warning") - (Expression (Cast Void (Var current_statement__))) (VariableDefn ((static false) (constexpr false) (type_ (Const (Ref Auto))) (name phi) @@ -5758,13 +5571,10 @@ (VariableDefn ((static true) (constexpr true) (type_ (TypeLiteral bool)) (name propto__) (init (Assignment (Literal true))))) - (Comment "suppress unused var warning") (Expression (Cast Void (Var propto__))) (VariableDefn ((static false) (constexpr false) (type_ (TypeLiteral local_scalar_t__)) (name DUMMY_VAR__) (init (Construction ((FunCall std::numeric_limits::quiet_NaN () ())))))) - (Comment "suppress unused var warning") - (Expression (Cast Void (Var DUMMY_VAR__))) (TryCatch ((VariableDefn ((static false) (constexpr false) @@ -6148,21 +5958,15 @@ (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) - (Comment "suppress unused var warning") - (Expression (Cast Void (Var current_statement__))) (VariableDefn ((static false) (constexpr false) (type_ (TypeLiteral local_scalar_t__)) (name DUMMY_VAR__) (init (Construction ((FunCall std::numeric_limits::quiet_NaN () ())))))) - (Comment "suppress unused var warning") - (Expression (Cast Void (Var DUMMY_VAR__))) (VariableDefn ((static true) (constexpr true) (type_ (Const (Pointer (TypeLiteral char)))) (name function__) (init (Assignment (Literal "\"mother_model_namespace::log_prob\""))))) - (Comment "suppress unused var warning") - (Expression (Cast Void (Var function__))) (TryCatch ((VariableDefn ((static false) (constexpr false) (type_ (TypeLiteral local_scalar_t__)) @@ -7305,21 +7109,15 @@ (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) - (Comment "suppress unused var warning") - (Expression (Cast Void (Var current_statement__))) (VariableDefn ((static false) (constexpr false) (type_ (TypeLiteral local_scalar_t__)) (name DUMMY_VAR__) (init (Construction ((FunCall std::numeric_limits::quiet_NaN () ())))))) - (Comment "suppress unused var warning") - (Expression (Cast Void (Var DUMMY_VAR__))) (VariableDefn ((static true) (constexpr true) (type_ (Const (Pointer (TypeLiteral char)))) (name function__) (init (Assignment (Literal "\"mother_model_namespace::log_prob\""))))) - (Comment "suppress unused var warning") - (Expression (Cast Void (Var function__))) (TryCatch ((VariableDefn ((static false) (constexpr false) (type_ (TypeLiteral local_scalar_t__)) @@ -8458,17 +8256,12 @@ (VariableDefn ((static true) (constexpr true) (type_ (TypeLiteral bool)) (name propto__) (init (Assignment (Literal true))))) - (Comment "suppress unused var warning") - (Expression (Cast Void (Var propto__))) (VariableDefn ((static false) (constexpr false) (type_ Double) (name lp__) (init (Assignment (Literal 0.0))))) - (Comment "suppress unused var warning") (Expression (Cast Void (Var lp__))) (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) - (Comment "suppress unused var warning") - (Expression (Cast Void (Var current_statement__))) (VariableDefn ((static false) (constexpr false) (type_ (TypeTrait stan::math::accumulator (Double))) (name lp_accum__) @@ -8478,19 +8271,13 @@ (name DUMMY_VAR__) (init (Construction ((FunCall std::numeric_limits::quiet_NaN () ())))))) - (Comment "suppress unused var warning") - (Expression (Cast Void (Var DUMMY_VAR__))) (VariableDefn ((static false) (constexpr true) (type_ (TypeLiteral bool)) (name jacobian__) (init (Assignment (Literal false))))) - (Comment "suppress unused var warning") - (Expression (Cast Void (Var jacobian__))) (VariableDefn ((static true) (constexpr true) (type_ (Const (Pointer (TypeLiteral char)))) (name function__) (init (Assignment (Literal "\"mother_model_namespace::write_array\""))))) - (Comment "suppress unused var warning") - (Expression (Cast Void (Var function__))) (TryCatch ((VariableDefn ((static false) (constexpr false) (type_ Double) (name p_real) @@ -10902,15 +10689,11 @@ (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) - (Comment "suppress unused var warning") - (Expression (Cast Void (Var current_statement__))) (VariableDefn ((static false) (constexpr false) (type_ (TypeLiteral local_scalar_t__)) (name DUMMY_VAR__) (init (Construction ((FunCall std::numeric_limits::quiet_NaN () ())))))) - (Comment "suppress unused var warning") - (Expression (Cast Void (Var DUMMY_VAR__))) (TryCatch ((VariableDefn ((static false) (constexpr false) (type_ (TypeLiteral local_scalar_t__)) @@ -11572,15 +11355,11 @@ (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) - (Comment "suppress unused var warning") - (Expression (Cast Void (Var current_statement__))) (VariableDefn ((static false) (constexpr false) (type_ (TypeLiteral local_scalar_t__)) (name DUMMY_VAR__) (init (Construction ((FunCall std::numeric_limits::quiet_NaN () ())))))) - (Comment "suppress unused var warning") - (Expression (Cast Void (Var DUMMY_VAR__))) (TryCatch ((Expression (Assign (Var current_statement__) (Literal 1))) (Expression @@ -16798,8 +16577,6 @@ ((VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) - (Comment "suppress unused var warning") - (Expression (Cast Void (Var current_statement__))) (Using local_scalar_t__ (Double)) (VariableDefn ((static false) (constexpr false) (type_ (TypeLiteral auto)) @@ -16808,20 +16585,14 @@ (Assignment (FunCall stan::services::util::create_rng () ((Var random_seed__) (Literal 0))))))) - (Comment "suppress unused var warning") - (Expression (Cast Void (Var base_rng__))) (VariableDefn ((static true) (constexpr true) (type_ (Const (Pointer (TypeLiteral char)))) (name function__) (init (Assignment (Literal "\"mother_model_namespace::mother_model\""))))) - (Comment "suppress unused var warning") - (Expression (Cast Void (Var function__))) (VariableDefn ((static false) (constexpr false) (type_ (TypeLiteral local_scalar_t__)) (name DUMMY_VAR__) (init (Construction ((FunCall std::numeric_limits::quiet_NaN () ())))))) - (Comment "suppress unused var warning") - (Expression (Cast Void (Var DUMMY_VAR__))) (TryCatch ((VariableDefn ((static false) (constexpr false) (type_ Int) (name pos__) @@ -20690,4 +20461,5 @@ (Preprocessor (MacroApply STAN_REGISTER_MAP_RECT (1 mother_model_namespace::binomialf_functor__))) (Preprocessor - (MacroApply STAN_REGISTER_MAP_RECT (2 mother_model_namespace::binomialf_functor__)))) + (MacroApply STAN_REGISTER_MAP_RECT (2 mother_model_namespace::binomialf_functor__))) + (Preprocessor (IfNDef _MSC_VER ((Preprocessor (Pragma "GCC diagnostic pop")))))) diff --git a/test/integration/good/code-gen/ode/cpp.expected b/test/integration/good/code-gen/ode/cpp.expected index 9768fa933..f9132b976 100644 --- a/test/integration/good/code-gen/ode/cpp.expected +++ b/test/integration/good/code-gen/ode/cpp.expected @@ -1,6 +1,12 @@ $ ../../../../../../install/default/bin/stanc --print-cpp ode_adjoint_test_model.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace ode_adjoint_test_model_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -121,15 +127,9 @@ f_0_arg(const T0__& t, const T1__& z_arg__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& z = stan::math::to_ref(z_arg__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 30; return z; @@ -151,15 +151,9 @@ f_1_arg(const T0__& t, const T1__& z_arg__, const T2__& a, std::ostream* using local_scalar_t__ = stan::promote_args_t, T2__>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& z = stan::math::to_ref(z_arg__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 32; return z; @@ -182,15 +176,9 @@ f_2_arg(const T0__& t, const T1__& z_arg__, const T2__& b, const T3__& a, using local_scalar_t__ = stan::promote_args_t, T3__>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& z = stan::math::to_ref(z_arg__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 34; return z; @@ -222,19 +210,11 @@ class ode_adjoint_test_model_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__ = std::numeric_limits::min(); pos__ = 1; @@ -322,15 +302,9 @@ class ode_adjoint_test_model_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "ode_adjoint_test_model_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ y = DUMMY_VAR__; current_statement__ = 1; @@ -394,15 +368,9 @@ class ode_adjoint_test_model_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "ode_adjoint_test_model_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ y = DUMMY_VAR__; current_statement__ = 1; @@ -467,25 +435,13 @@ class ode_adjoint_test_model_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "ode_adjoint_test_model_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { double y = std::numeric_limits::quiet_NaN(); current_statement__ = 1; @@ -561,11 +517,7 @@ class ode_adjoint_test_model_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { local_scalar_t__ y = DUMMY_VAR__; current_statement__ = 1; @@ -599,11 +551,7 @@ class ode_adjoint_test_model_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "y", "double", @@ -828,10 +776,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return ode_adjoint_test_model_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../../install/default/bin/stanc --print-cpp overloaded-ode.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace overloaded_ode_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -1010,15 +967,9 @@ simple_SIR(const T0__& t, const T1__& y_arg__, const T2__& beta, const T3__& stan::base_type_t, T2__, T3__, T4__, stan::promote_args_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& y = stan::math::to_ref(y_arg__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { Eigen::Matrix dydt = Eigen::Matrix::Constant(4, DUMMY_VAR__); @@ -1077,15 +1028,9 @@ simple_SIR(const T0__& t, const T1__& y_arg__, const T2__& beta, const T3__& stan::base_type_t, T2__, T3__, T4__, stan::promote_args_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& y = stan::math::to_ref(y_arg__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { Eigen::Matrix dydt = Eigen::Matrix::Constant(4, DUMMY_VAR__); @@ -1139,19 +1084,11 @@ class overloaded_ode_model final : public model_base_crtp random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "overloaded_ode_model_namespace::overloaded_ode_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__ = std::numeric_limits::min(); pos__ = 1; @@ -1248,15 +1185,9 @@ class overloaded_ode_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "overloaded_ode_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ beta = DUMMY_VAR__; current_statement__ = 1; @@ -1380,15 +1311,9 @@ class overloaded_ode_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "overloaded_ode_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ beta = DUMMY_VAR__; current_statement__ = 1; @@ -1513,25 +1438,13 @@ class overloaded_ode_model final : public model_base_crtp stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "overloaded_ode_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { double beta = std::numeric_limits::quiet_NaN(); current_statement__ = 1; @@ -1611,11 +1524,7 @@ class overloaded_ode_model final : public model_base_crtp stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { local_scalar_t__ beta = DUMMY_VAR__; current_statement__ = 1; @@ -1644,11 +1553,7 @@ class overloaded_ode_model final : public model_base_crtp using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "beta", "double", @@ -1864,3 +1769,6 @@ stan::math::profile_map& get_stan_profile_data() { return overloaded_ode_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif diff --git a/test/integration/good/code-gen/opencl/cpp.expected b/test/integration/good/code-gen/opencl/cpp.expected index 34d5a1bb6..04f44c976 100644 --- a/test/integration/good/code-gen/opencl/cpp.expected +++ b/test/integration/good/code-gen/opencl/cpp.expected @@ -1,6 +1,12 @@ $ ../../../../../../install/default/bin/stanc --print-cpp --use-opencl distributions.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace distributions_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -797,19 +803,11 @@ class distributions_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "distributions_model_namespace::distributions_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__ = std::numeric_limits::min(); pos__ = 1; @@ -923,15 +921,9 @@ class distributions_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "distributions_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ p_real = DUMMY_VAR__; current_statement__ = 1; @@ -3979,15 +3971,9 @@ class distributions_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "distributions_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ p_real = DUMMY_VAR__; current_statement__ = 1; @@ -7036,25 +7022,13 @@ class distributions_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "distributions_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { double p_real = std::numeric_limits::quiet_NaN(); current_statement__ = 1; @@ -10108,11 +10082,7 @@ class distributions_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { local_scalar_t__ p_real = DUMMY_VAR__; current_statement__ = 1; @@ -10162,11 +10132,7 @@ class distributions_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "p_real", "double", @@ -10445,10 +10411,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return distributions_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../../install/default/bin/stanc --print-cpp --use-opencl restricted.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace restricted_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -10511,19 +10486,11 @@ class restricted_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "restricted_model_namespace::restricted_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__ = std::numeric_limits::min(); pos__ = 1; @@ -10634,15 +10601,9 @@ class restricted_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "restricted_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ p_real = DUMMY_VAR__; current_statement__ = 1; @@ -10743,15 +10704,9 @@ class restricted_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "restricted_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ p_real = DUMMY_VAR__; current_statement__ = 1; @@ -10853,25 +10808,13 @@ class restricted_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "restricted_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { double p_real = std::numeric_limits::quiet_NaN(); current_statement__ = 1; @@ -10981,11 +10924,7 @@ class restricted_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { local_scalar_t__ p_real = DUMMY_VAR__; current_statement__ = 1; @@ -11035,11 +10974,7 @@ class restricted_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "p_real", "double", @@ -11319,3 +11254,6 @@ stan::math::profile_map& get_stan_profile_data() { return restricted_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif diff --git a/test/integration/good/code-gen/profiling/cpp.expected b/test/integration/good/code-gen/profiling/cpp.expected index 8606ba9fc..c2881b779 100644 --- a/test/integration/good/code-gen/profiling/cpp.expected +++ b/test/integration/good/code-gen/profiling/cpp.expected @@ -1,6 +1,12 @@ $ ../../../../../../install/default/bin/stanc --print-cpp simple_function.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace simple_function_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -48,19 +54,11 @@ class simple_function_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__ = std::numeric_limits::min(); pos__ = 1; @@ -134,15 +132,9 @@ class simple_function_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "simple_function_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ rho = DUMMY_VAR__; current_statement__ = 1; @@ -234,15 +226,9 @@ class simple_function_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "simple_function_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ rho = DUMMY_VAR__; current_statement__ = 1; @@ -335,25 +321,13 @@ class simple_function_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "simple_function_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { double rho = std::numeric_limits::quiet_NaN(); current_statement__ = 1; @@ -392,11 +366,7 @@ class simple_function_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { local_scalar_t__ rho = DUMMY_VAR__; current_statement__ = 1; @@ -421,11 +391,7 @@ class simple_function_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "rho", "double", @@ -591,3 +557,6 @@ stan::math::profile_map& get_stan_profile_data() { return simple_function_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif diff --git a/test/integration/good/code-gen/standalone_functions/cpp.expected b/test/integration/good/code-gen/standalone_functions/cpp.expected index 78001f42a..7d9ea81e5 100644 --- a/test/integration/good/code-gen/standalone_functions/cpp.expected +++ b/test/integration/good/code-gen/standalone_functions/cpp.expected @@ -1,6 +1,12 @@ $ ../../../../../../install/default/bin/stanc --standalone-functions --allow-undefined --print-cpp basic.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace basic_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -115,14 +121,8 @@ stan::promote_args_t my_log1p_exp(const T0__& x, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; return stan::math::log1p_exp(x); @@ -141,14 +141,8 @@ stan::promote_args_t> array_fun(const T0__& a, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 3; return stan::math::sum(a); @@ -163,14 +157,8 @@ template ::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 5; return stan::math::sum(a); @@ -186,15 +174,9 @@ Eigen::Matrix>,-1,1> my_vector_mul_by_5(const T0__& x_arg__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& x = stan::math::to_ref(x_arg__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 7; stan::math::validate_non_negative_index("result", "num_elements(x)", @@ -218,14 +200,8 @@ int int_only_multiplication(const T0__& a, const T1__& b, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 11; return (a * b); @@ -241,14 +217,8 @@ stan::promote_args_t test_lgamma(const T0__& x, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 13; return stan::math::lgamma(x); @@ -266,11 +236,7 @@ test_lp(const T0__& a, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 15; lp_accum__.add(stan::math::normal_lpdf(a, 0, 1)); @@ -286,14 +252,8 @@ stan::promote_args_t test_rng(const T0__& a, RNG& base_rng__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 17; return stan::math::normal_rng(a, 1, base_rng__); @@ -311,11 +271,7 @@ stan::promote_args_t test_lpdf(const T0__& a, const T1__& b, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 19; return stan::math::normal_lpdf(a, b, 1); @@ -331,15 +287,9 @@ Eigen::Matrix>>,-1,-1> test_complex(const T0__& a_arg__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& a = stan::math::to_ref(a_arg__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 21; return stan::math::add(a, a); @@ -371,14 +321,8 @@ std::vector< array_fun(const T0__& a, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 23; return a; @@ -446,9 +390,18 @@ array_fun(const std::vector>>>& a, std::ostream* pstream__ = nullptr) { return basic_model_namespace::array_fun(a, pstream__); } +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif $ ../../../../../../install/default/bin/stanc --standalone-functions --allow-undefined --print-cpp basic.stanfunctions // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace basic_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -533,14 +486,8 @@ stan::promote_args_t my_log1p_exp(const T0__& x, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; return stan::math::log1p_exp(x); @@ -559,14 +506,8 @@ stan::promote_args_t> array_fun(const T0__& a, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 3; return stan::math::sum(a); @@ -581,14 +522,8 @@ template ::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 5; return stan::math::sum(a); @@ -604,15 +539,9 @@ Eigen::Matrix>,-1,1> my_vector_mul_by_5(const T0__& x_arg__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& x = stan::math::to_ref(x_arg__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 7; stan::math::validate_non_negative_index("result", "num_elements(x)", @@ -636,14 +565,8 @@ int int_only_multiplication(const T0__& a, const T1__& b, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 11; return (a * b); @@ -659,14 +582,8 @@ stan::promote_args_t test_lgamma(const T0__& x, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 13; return stan::math::lgamma(x); @@ -684,11 +601,7 @@ test_lp(const T0__& a, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 15; lp_accum__.add(stan::math::normal_lpdf(a, 0, 1)); @@ -704,14 +617,8 @@ stan::promote_args_t test_rng(const T0__& a, RNG& base_rng__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 17; return stan::math::normal_rng(a, 1, base_rng__); @@ -729,11 +636,7 @@ stan::promote_args_t test_lpdf(const T0__& a, const T1__& b, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 19; return stan::math::normal_lpdf(a, b, 1); @@ -789,9 +692,18 @@ double test_lpdf(const double& a, const double& b, std::ostream* pstream__ = nullptr) { return basic_model_namespace::test_lpdf(a, b, pstream__); } +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif $ ../../../../../../install/default/bin/stanc --standalone-functions --allow-undefined --print-cpp integrate.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace integrate_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -878,15 +790,9 @@ Eigen::Matrix>,-1,1> integrand(const T0__& x_arg__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& x = stan::math::to_ref(x_arg__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; return stan::math::exp(stan::math::minus(stan::math::square(x))); @@ -928,14 +834,8 @@ integrand_ode(const T0__& r, const T1__& f, const T2__& theta, const T3__& stan::base_type_t, stan::base_type_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { std::vector df_dx = std::vector(1, DUMMY_VAR__); @@ -956,14 +856,8 @@ integrand_ode(const T0__& r, const T1__& f, const T2__& theta, const T3__& double ode_integrate(std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { std::vector x_i = std::vector(0, std::numeric_limits::min()); @@ -1000,6 +894,9 @@ integrand_ode(const double& r, const std::vector& f, double ode_integrate(std::ostream* pstream__ = nullptr) { return integrate_model_namespace::ode_integrate(pstream__); } +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif Warning in 'integrate.stan', line 21, column 12: integrate_ode_bdf is deprecated and will be removed in Stan 3.0. Use ode_bdf instead. The new interface is slightly different, see: diff --git a/test/integration/good/compiler-optimizations/cpp.expected b/test/integration/good/compiler-optimizations/cpp.expected index e50e1b63a..0c12c7570 100644 --- a/test/integration/good/compiler-optimizations/cpp.expected +++ b/test/integration/good/compiler-optimizations/cpp.expected @@ -1,6 +1,12 @@ $ ../../../../../install/default/bin/stanc --O --print-cpp ad-level-deep-dependence.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace ad_level_deep_dependence_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -31,19 +37,11 @@ class ad_level_deep_dependence_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__; pos__ = 1; @@ -689,15 +687,9 @@ class ad_level_deep_dependence_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "ad_level_deep_dependence_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix lcm_sym23__; Eigen::Matrix lcm_sym22__; @@ -767,15 +759,9 @@ class ad_level_deep_dependence_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "ad_level_deep_dependence_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix lcm_sym17__; Eigen::Matrix lcm_sym16__; @@ -847,25 +833,13 @@ class ad_level_deep_dependence_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "ad_level_deep_dependence_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix lcm_sym11__; Eigen::Matrix lcm_sym10__; @@ -953,11 +927,7 @@ class ad_level_deep_dependence_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { Eigen::Matrix X_p; current_statement__ = 1; @@ -976,11 +946,7 @@ class ad_level_deep_dependence_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "X_p", "double", @@ -1865,10 +1831,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return ad_level_deep_dependence_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --O --print-cpp ad-level-failing.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace ad_level_failing_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -1999,14 +1974,8 @@ simple_SIR(const T0__& t, const T1__& y, const T2__& theta, const T3__& x_r, stan::base_type_t, stan::base_type_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { local_scalar_t__ lcm_sym4__; double lcm_sym3__; @@ -2069,19 +2038,11 @@ class ad_level_failing_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 16; context__.validate_dims("data initialization", "N_t", "int", @@ -2164,15 +2125,9 @@ class ad_level_failing_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "ad_level_failing_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { std::vector lcm_sym35__; double lcm_sym34__; @@ -2287,15 +2242,9 @@ class ad_level_failing_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "ad_level_failing_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { std::vector lcm_sym24__; double lcm_sym23__; @@ -2411,25 +2360,13 @@ class ad_level_failing_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "ad_level_failing_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { double lcm_sym13__; double lcm_sym12__; @@ -2547,11 +2484,7 @@ class ad_level_failing_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { local_scalar_t__ beta; current_statement__ = 1; @@ -2580,11 +2513,7 @@ class ad_level_failing_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "beta", "double", @@ -2784,6 +2713,9 @@ stan::math::profile_map& get_stan_profile_data() { return ad_level_failing_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif Warning in 'ad-level-failing.stan', line 46, column 8: integrate_ode_rk45 is deprecated and will be removed in Stan 3.0. Use ode_rk45 instead. The new interface is slightly different, see: @@ -2791,6 +2723,12 @@ Warning in 'ad-level-failing.stan', line 46, column 8: integrate_ode_rk45 is $ ../../../../../install/default/bin/stanc --O --print-cpp ad-levels-deep.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace ad_levels_deep_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -2815,19 +2753,11 @@ class ad_levels_deep_model final : public model_base_crtp random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "ad_levels_deep_model_namespace::ad_levels_deep_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__; pos__ = 1; @@ -3473,15 +3403,9 @@ class ad_levels_deep_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "ad_levels_deep_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix lcm_sym11__; Eigen::Matrix lcm_sym10__; @@ -3519,15 +3443,9 @@ class ad_levels_deep_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "ad_levels_deep_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix lcm_sym9__; Eigen::Matrix lcm_sym8__; @@ -3570,25 +3488,13 @@ class ad_levels_deep_model final : public model_base_crtp stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "ad_levels_deep_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix lcm_sym7__; Eigen::Matrix lcm_sym6__; @@ -3638,11 +3544,7 @@ class ad_levels_deep_model final : public model_base_crtp stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { Eigen::Matrix X_p; current_statement__ = 1; @@ -3661,11 +3563,7 @@ class ad_levels_deep_model final : public model_base_crtp using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "X_p", "double", @@ -4477,10 +4375,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return ad_levels_deep_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --O --print-cpp copy-prop-profile.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace copy_prop_profile_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -4511,19 +4418,11 @@ class copy_prop_profile_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 13; context__.validate_dims("data initialization", "N", "int", @@ -4563,15 +4462,9 @@ class copy_prop_profile_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "copy_prop_profile_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ lcm_sym10__; Eigen::Matrix lcm_sym9__; @@ -4633,15 +4526,9 @@ class copy_prop_profile_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "copy_prop_profile_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ lcm_sym8__; Eigen::Matrix lcm_sym7__; @@ -4704,25 +4591,13 @@ class copy_prop_profile_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "copy_prop_profile_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { int lcm_sym6__; int lcm_sym5__; @@ -4752,11 +4627,7 @@ class copy_prop_profile_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { Eigen::Matrix X; current_statement__ = 1; @@ -4775,11 +4646,7 @@ class copy_prop_profile_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "X", "double", @@ -4977,10 +4844,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return copy_prop_profile_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --O --print-cpp copy_fail.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace copy_fail_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -5079,14 +4955,8 @@ template ::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int lcm_sym25__; int lcm_sym24__; @@ -5122,14 +4992,8 @@ template ::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int lcm_sym31__; int lcm_sym30__; @@ -5178,16 +5042,10 @@ prob_uncaptured(const T0__& nind, const T1__& n_occasions, const T2__& using local_scalar_t__ = stan::promote_args_t, stan::base_type_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& p = stan::math::to_ref(p_arg__); const auto& phi = stan::math::to_ref(phi_arg__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { double lcm_sym41__; double lcm_sym40__; @@ -5332,19 +5190,11 @@ class copy_fail_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "copy_fail_model_namespace::copy_fail_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__; pos__ = 1; @@ -5570,15 +5420,9 @@ class copy_fail_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "copy_fail_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { double lcm_sym158__; int lcm_sym157__; @@ -6004,15 +5848,9 @@ class copy_fail_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "copy_fail_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { double lcm_sym115__; int lcm_sym114__; @@ -6438,25 +6276,13 @@ class copy_fail_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "copy_fail_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { double lcm_sym72__; int lcm_sym71__; @@ -6776,11 +6602,7 @@ class copy_fail_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { local_scalar_t__ mean_p; current_statement__ = 1; @@ -6803,11 +6625,7 @@ class copy_fail_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "mean_p", "double", @@ -7046,10 +6864,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return copy_fail_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --O --print-cpp dce-fail.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace dce_fail_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -7147,19 +6974,11 @@ class dce_fail_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "dce_fail_model_namespace::dce_fail_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__; pos__ = 1; @@ -7354,15 +7173,9 @@ class dce_fail_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "dce_fail_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { double lcm_sym61__; double lcm_sym60__; @@ -7635,15 +7448,9 @@ class dce_fail_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "dce_fail_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { double lcm_sym39__; double lcm_sym38__; @@ -7917,25 +7724,13 @@ class dce_fail_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "dce_fail_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { int lcm_sym17__; int lcm_sym16__; @@ -8034,11 +7829,7 @@ class dce_fail_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { local_scalar_t__ sigma; current_statement__ = 1; @@ -8125,11 +7916,7 @@ class dce_fail_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "sigma", "double", @@ -8587,10 +8374,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return dce_fail_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --O --print-cpp expr-prop-experiment.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace expr_prop_experiment_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -8619,19 +8415,11 @@ class expr_prop_experiment_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("data initialization", "j", "int", @@ -8683,15 +8471,9 @@ class expr_prop_experiment_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "expr_prop_experiment_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; lp_accum__.add(lp__); return lp_accum__.sum(); } @@ -8709,15 +8491,9 @@ class expr_prop_experiment_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "expr_prop_experiment_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; lp_accum__.add(lp__); return lp_accum__.sum(); } @@ -8736,25 +8512,13 @@ class expr_prop_experiment_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "expr_prop_experiment_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { int lcm_sym2__; int lcm_sym1__; @@ -8780,11 +8544,7 @@ class expr_prop_experiment_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } template * = nullptr> inline void @@ -8793,11 +8553,7 @@ class expr_prop_experiment_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } inline void get_param_names(std::vector& names__, const bool @@ -8930,10 +8686,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return expr_prop_experiment_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --O --print-cpp expr-prop-experiment2.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace expr_prop_experiment2_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -8960,19 +8725,11 @@ class expr_prop_experiment2_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("data initialization", "j", "int", @@ -9023,15 +8780,9 @@ class expr_prop_experiment2_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "expr_prop_experiment2_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; lp_accum__.add(lp__); return lp_accum__.sum(); } @@ -9049,15 +8800,9 @@ class expr_prop_experiment2_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "expr_prop_experiment2_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; lp_accum__.add(lp__); return lp_accum__.sum(); } @@ -9076,25 +8821,13 @@ class expr_prop_experiment2_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "expr_prop_experiment2_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { int lcm_sym2__; int lcm_sym1__; @@ -9120,11 +8853,7 @@ class expr_prop_experiment2_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } template * = nullptr> inline void @@ -9133,11 +8862,7 @@ class expr_prop_experiment2_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } inline void get_param_names(std::vector& names__, const bool @@ -9270,10 +8995,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return expr_prop_experiment2_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --O --print-cpp expr-prop-fail.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace expr_prop_fail_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -9306,19 +9040,11 @@ class expr_prop_fail_model final : public model_base_crtp random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "expr_prop_fail_model_namespace::expr_prop_fail_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__; pos__ = 1; @@ -9382,15 +9108,9 @@ class expr_prop_fail_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "expr_prop_fail_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { double lcm_sym17__; double lcm_sym16__; @@ -9476,15 +9196,9 @@ class expr_prop_fail_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "expr_prop_fail_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { double lcm_sym11__; double lcm_sym10__; @@ -9571,25 +9285,13 @@ class expr_prop_fail_model final : public model_base_crtp stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "expr_prop_fail_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { int lcm_sym5__; int lcm_sym4__; @@ -9631,11 +9333,7 @@ class expr_prop_fail_model final : public model_base_crtp stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { Eigen::Matrix mu; current_statement__ = 1; @@ -9663,11 +9361,7 @@ class expr_prop_fail_model final : public model_base_crtp using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "mu", "double", @@ -9869,10 +9563,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return expr_prop_fail_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --O --print-cpp expr-prop-fail2.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace expr_prop_fail2_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -9901,19 +9604,11 @@ class expr_prop_fail2_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 6; context__.validate_dims("data initialization", "J", "int", @@ -9970,15 +9665,9 @@ class expr_prop_fail2_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "expr_prop_fail2_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { double lcm_sym6__; double lcm_sym5__; @@ -10019,15 +9708,9 @@ class expr_prop_fail2_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "expr_prop_fail2_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { double lcm_sym4__; double lcm_sym3__; @@ -10069,25 +9752,13 @@ class expr_prop_fail2_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "expr_prop_fail2_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { int lcm_sym2__; int lcm_sym1__; @@ -10127,11 +9798,7 @@ class expr_prop_fail2_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { local_scalar_t__ mu; current_statement__ = 1; @@ -10157,11 +9824,7 @@ class expr_prop_fail2_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "mu", "double", @@ -10334,10 +9997,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return expr_prop_fail2_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --O --print-cpp expr-prop-fail3.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace expr_prop_fail3_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -10429,19 +10101,11 @@ class expr_prop_fail3_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__; pos__ = 1; @@ -10701,15 +10365,9 @@ class expr_prop_fail3_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "expr_prop_fail3_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { double lcm_sym43__; double lcm_sym42__; @@ -10894,15 +10552,9 @@ class expr_prop_fail3_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "expr_prop_fail3_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { double lcm_sym33__; double lcm_sym32__; @@ -11088,25 +10740,13 @@ class expr_prop_fail3_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "expr_prop_fail3_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { double lcm_sym23__; double lcm_sym22__; @@ -11287,11 +10927,7 @@ class expr_prop_fail3_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { Eigen::Matrix a; current_statement__ = 1; @@ -11360,11 +10996,7 @@ class expr_prop_fail3_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "a", "double", @@ -11807,10 +11439,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return expr_prop_fail3_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --O --print-cpp expr-prop-fail4.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace expr_prop_fail4_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -11883,19 +11524,11 @@ class expr_prop_fail4_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__; pos__ = 1; @@ -12020,15 +11653,9 @@ class expr_prop_fail4_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "expr_prop_fail4_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ lcm_sym30__; double lcm_sym29__; @@ -12093,15 +11720,9 @@ class expr_prop_fail4_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "expr_prop_fail4_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ lcm_sym23__; double lcm_sym22__; @@ -12172,25 +11793,13 @@ class expr_prop_fail4_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "expr_prop_fail4_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { double lcm_sym14__; double lcm_sym13__; @@ -12347,11 +11956,7 @@ class expr_prop_fail4_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { local_scalar_t__ tau_phi; current_statement__ = 1; @@ -12374,11 +11979,7 @@ class expr_prop_fail4_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "tau_phi", @@ -12649,10 +12250,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return expr_prop_fail4_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --O --print-cpp expr-prop-fail5.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace expr_prop_fail5_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -12753,14 +12363,8 @@ template ::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int lcm_sym25__; int lcm_sym24__; @@ -12796,14 +12400,8 @@ template ::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int lcm_sym31__; int lcm_sym30__; @@ -12852,16 +12450,10 @@ prob_uncaptured(const T0__& nind, const T1__& n_occasions, const T2__& using local_scalar_t__ = stan::promote_args_t, stan::base_type_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& p = stan::math::to_ref(p_arg__); const auto& phi = stan::math::to_ref(phi_arg__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { double lcm_sym41__; double lcm_sym40__; @@ -13001,19 +12593,11 @@ class expr_prop_fail5_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__; pos__ = 1; @@ -13181,15 +12765,9 @@ class expr_prop_fail5_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "expr_prop_fail5_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { double lcm_sym158__; int lcm_sym157__; @@ -13614,15 +13192,9 @@ class expr_prop_fail5_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "expr_prop_fail5_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { double lcm_sym115__; int lcm_sym114__; @@ -14047,25 +13619,13 @@ class expr_prop_fail5_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "expr_prop_fail5_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { double lcm_sym72__; int lcm_sym71__; @@ -14390,11 +13950,7 @@ class expr_prop_fail5_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { local_scalar_t__ mean_phi; current_statement__ = 1; @@ -14425,11 +13981,7 @@ class expr_prop_fail5_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "mean_phi", @@ -14703,10 +14255,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return expr_prop_fail5_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --O --print-cpp expr-prop-fail6.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace expr_prop_fail6_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -14908,14 +14469,8 @@ template ::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int lcm_sym51__; int lcm_sym50__; @@ -14951,14 +14506,8 @@ template ::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int lcm_sym57__; int lcm_sym56__; @@ -15006,16 +14555,10 @@ prob_uncaptured(const T0__& p_arg__, const T1__& phi_arg__, std::ostream* using local_scalar_t__ = stan::promote_args_t, stan::base_type_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& p = stan::math::to_ref(p_arg__); const auto& phi = stan::math::to_ref(phi_arg__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int lcm_sym69__; double lcm_sym68__; @@ -15172,15 +14715,11 @@ js_super_lp(const T0__& y, const T1__& first, const T2__& last, const T3__& stan::base_type_t, stan::base_type_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& p = stan::math::to_ref(p_arg__); const auto& phi = stan::math::to_ref(phi_arg__); const auto& nu = stan::math::to_ref(nu_arg__); const auto& chi = stan::math::to_ref(chi_arg__); local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int lcm_sym120__; int lcm_sym119__; @@ -15713,19 +15252,11 @@ class expr_prop_fail6_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__; pos__ = 1; @@ -15908,15 +15439,9 @@ class expr_prop_fail6_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "expr_prop_fail6_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { int lcm_sym336__; int lcm_sym335__; @@ -16835,15 +16360,9 @@ class expr_prop_fail6_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "expr_prop_fail6_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { int lcm_sym260__; int lcm_sym259__; @@ -17766,25 +17285,13 @@ class expr_prop_fail6_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "expr_prop_fail6_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { int lcm_sym184__; int lcm_sym183__; @@ -18449,11 +17956,7 @@ class expr_prop_fail6_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { local_scalar_t__ mean_phi; current_statement__ = 1; @@ -18494,11 +17997,7 @@ class expr_prop_fail6_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "mean_phi", @@ -18873,10 +18372,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return expr_prop_fail6_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --O --print-cpp expr-prop-fail7.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace expr_prop_fail7_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -18944,19 +18452,11 @@ class expr_prop_fail7_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__; pos__ = 1; @@ -19148,15 +18648,9 @@ class expr_prop_fail7_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "expr_prop_fail7_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { double lcm_sym58__; Eigen::Matrix lcm_sym57__; @@ -19333,15 +18827,9 @@ class expr_prop_fail7_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "expr_prop_fail7_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { double lcm_sym44__; Eigen::Matrix lcm_sym43__; @@ -19522,25 +19010,13 @@ class expr_prop_fail7_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "expr_prop_fail7_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { double lcm_sym30__; double lcm_sym29__; @@ -19772,11 +19248,7 @@ class expr_prop_fail7_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { Eigen::Matrix pi; current_statement__ = 1; @@ -19811,11 +19283,7 @@ class expr_prop_fail7_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "pi", "double", @@ -20123,10 +19591,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return expr_prop_fail7_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --O --print-cpp expr-prop-fail8.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace expr_prop_fail8_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -20176,19 +19653,11 @@ class expr_prop_fail8_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__; pos__ = 1; @@ -20300,15 +19769,9 @@ class expr_prop_fail8_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "expr_prop_fail8_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ lcm_sym16__; double lcm_sym15__; @@ -20375,15 +19838,9 @@ class expr_prop_fail8_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "expr_prop_fail8_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ lcm_sym13__; double lcm_sym12__; @@ -20454,25 +19911,13 @@ class expr_prop_fail8_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "expr_prop_fail8_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { double lcm_sym10__; Eigen::Matrix lcm_sym9__; @@ -20547,11 +19992,7 @@ class expr_prop_fail8_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { local_scalar_t__ beta0; current_statement__ = 1; @@ -20592,11 +20033,7 @@ class expr_prop_fail8_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "beta0", "double", @@ -20870,10 +20307,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return expr_prop_fail8_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --O --print-cpp fails-test.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace fails_test_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -20972,14 +20418,8 @@ template ::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int lcm_sym25__; int lcm_sym24__; @@ -21015,14 +20455,8 @@ template ::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int lcm_sym31__; int lcm_sym30__; @@ -21071,16 +20505,10 @@ prob_uncaptured(const T0__& nind, const T1__& n_occasions, const T2__& using local_scalar_t__ = stan::promote_args_t, stan::base_type_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& p = stan::math::to_ref(p_arg__); const auto& phi = stan::math::to_ref(phi_arg__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { double lcm_sym41__; double lcm_sym40__; @@ -21225,19 +20653,11 @@ class fails_test_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "fails_test_model_namespace::fails_test_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__; pos__ = 1; @@ -21463,15 +20883,9 @@ class fails_test_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "fails_test_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { double lcm_sym158__; int lcm_sym157__; @@ -21897,15 +21311,9 @@ class fails_test_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "fails_test_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { double lcm_sym115__; int lcm_sym114__; @@ -22331,25 +21739,13 @@ class fails_test_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "fails_test_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { double lcm_sym72__; int lcm_sym71__; @@ -22669,11 +22065,7 @@ class fails_test_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { local_scalar_t__ mean_p; current_statement__ = 1; @@ -22696,11 +22088,7 @@ class fails_test_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "mean_p", "double", @@ -22939,10 +22327,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return fails_test_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --O --print-cpp function-in-function-inline.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace function_in_function_inline_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -22974,12 +22371,8 @@ stan::promote_args_t> inner_lpdf(const T0__& phi_arg__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& phi = stan::math::to_ref(phi_arg__); local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { double lcm_sym15__; { @@ -22998,12 +22391,8 @@ stan::promote_args_t> outer_lpdf(const T0__& phi_arg__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& phi = stan::math::to_ref(phi_arg__); local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { double lcm_sym16__; { @@ -23028,19 +22417,11 @@ class function_in_function_inline_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__; pos__ = 1; @@ -23135,15 +22516,9 @@ class function_in_function_inline_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "function_in_function_inline_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { double lcm_sym20__; { @@ -23178,15 +22553,9 @@ class function_in_function_inline_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "function_in_function_inline_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { double lcm_sym19__; { @@ -23222,25 +22591,13 @@ class function_in_function_inline_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "function_in_function_inline_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { int lcm_sym18__; int lcm_sym17__; @@ -23266,11 +22623,7 @@ class function_in_function_inline_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } template * = nullptr> inline void @@ -23279,11 +22632,7 @@ class function_in_function_inline_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } inline void get_param_names(std::vector& names__, const bool @@ -23416,10 +22765,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return function_in_function_inline_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --O --print-cpp function-in-function-loops.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace function_in_function_loops_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -23459,14 +22817,8 @@ stan::promote_args_t do_something(const T0__& x, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 13; return x; @@ -23482,15 +22834,9 @@ stan::promote_args_t> summer(const T0__& et_arg__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& et = stan::math::to_ref(et_arg__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { double lcm_sym27__; int lcm_sym26__; @@ -23535,19 +22881,11 @@ class function_in_function_loops_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 12; context__.validate_dims("data initialization", "N", "int", @@ -23581,15 +22919,9 @@ class function_in_function_loops_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "function_in_function_loops_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { double lcm_sym45__; double lcm_sym44__; @@ -23677,15 +23009,9 @@ class function_in_function_loops_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "function_in_function_loops_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { double lcm_sym37__; double lcm_sym36__; @@ -23774,25 +23100,13 @@ class function_in_function_loops_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "function_in_function_loops_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { int lcm_sym29__; int lcm_sym28__; @@ -23818,11 +23132,7 @@ class function_in_function_loops_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } template * = nullptr> inline void @@ -23831,11 +23141,7 @@ class function_in_function_loops_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } inline void get_param_names(std::vector& names__, const bool @@ -23968,10 +23274,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return function_in_function_loops_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --O --print-cpp fuzz-div0.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace fuzz_div0_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -23990,19 +23305,11 @@ class fuzz_div0_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "fuzz_div0_model_namespace::fuzz_div0_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; num_params_r__ = 0U; } inline std::string model_name() const final { @@ -24026,15 +23333,9 @@ class fuzz_div0_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "fuzz_div0_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { std::vector T = std::vector(6, std::numeric_limits::min()); @@ -24072,15 +23373,9 @@ class fuzz_div0_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "fuzz_div0_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { std::vector T = std::vector(6, std::numeric_limits::min()); @@ -24119,25 +23414,13 @@ class fuzz_div0_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "fuzz_div0_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { int lcm_sym2__; int lcm_sym1__; @@ -24163,11 +23446,7 @@ class fuzz_div0_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } template * = nullptr> inline void @@ -24176,11 +23455,7 @@ class fuzz_div0_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } inline void get_param_names(std::vector& names__, const bool @@ -24314,6 +23589,9 @@ stan::math::profile_map& get_stan_profile_data() { return fuzz_div0_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif Warning in 'fuzz-div0.stan', line 2, column 34: Found int division: 0 / 0 Values will be rounded towards zero. If rounding is not desired you can @@ -24331,6 +23609,12 @@ Warning in 'fuzz-div0.stan', line 2, column 41: Found int division: $ ../../../../../install/default/bin/stanc --O --print-cpp initialize-SoA.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace initialize_SoA_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -24352,19 +23636,11 @@ class initialize_SoA_model final : public model_base_crtp random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "initialize_SoA_model_namespace::initialize_SoA_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; num_params_r__ = 3 + (3 * 4); } inline std::string model_name() const final { @@ -24388,15 +23664,9 @@ class initialize_SoA_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "initialize_SoA_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix lcm_sym20__; double lcm_sym19__; @@ -24459,15 +23729,9 @@ class initialize_SoA_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "initialize_SoA_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix lcm_sym16__; double lcm_sym15__; @@ -24538,25 +23802,13 @@ class initialize_SoA_model final : public model_base_crtp stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "initialize_SoA_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix lcm_sym12__; double lcm_sym11__; @@ -24666,11 +23918,7 @@ class initialize_SoA_model final : public model_base_crtp stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { Eigen::Matrix y; current_statement__ = 1; @@ -24702,11 +23950,7 @@ class initialize_SoA_model final : public model_base_crtp using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "y", "double", @@ -25005,10 +24249,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return initialize_SoA_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --O --print-cpp inline-functions-varmat.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace inline_functions_varmat_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -25046,15 +24299,9 @@ Eigen::Matrix>,-1,1> single_ret_fun(const T0__& A_arg__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& A = stan::math::to_ref(A_arg__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 10; return A; @@ -25070,15 +24317,9 @@ Eigen::Matrix>,-1,1> multi_ret_fun(const T0__& A_arg__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& A = stan::math::to_ref(A_arg__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int lcm_sym19__; { @@ -25108,19 +24349,11 @@ class inline_functions_varmat_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; num_params_r__ = 5 + 5; } inline std::string model_name() const final { @@ -25144,15 +24377,9 @@ class inline_functions_varmat_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "inline_functions_varmat_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { int lcm_sym29__; Eigen::Matrix p_single_ret_vec; @@ -25217,15 +24444,9 @@ class inline_functions_varmat_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "inline_functions_varmat_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { int lcm_sym28__; stan::math::var_value> p_single_ret_vec; @@ -25297,25 +24518,13 @@ class inline_functions_varmat_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "inline_functions_varmat_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { int lcm_sym27__; int lcm_sym26__; @@ -25391,11 +24600,7 @@ class inline_functions_varmat_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { Eigen::Matrix p_single_ret_vec; current_statement__ = 1; @@ -25420,11 +24625,7 @@ class inline_functions_varmat_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "p_single_ret_vec", @@ -25699,10 +24900,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return inline_functions_varmat_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --O --print-cpp inline-tdata.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace inline_tdata_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -25729,14 +24939,8 @@ Eigen::Matrix foo(const T0__& N, const T1__& M, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { Eigen::Matrix lcm_sym1__; { @@ -25762,19 +24966,11 @@ class inline_tdata_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "inline_tdata_model_namespace::inline_tdata_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__; pos__ = 1; @@ -25824,15 +25020,9 @@ class inline_tdata_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "inline_tdata_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { double lcm_sym5__; local_scalar_t__ alpha; @@ -25863,15 +25053,9 @@ class inline_tdata_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "inline_tdata_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { double lcm_sym4__; local_scalar_t__ alpha; @@ -25903,25 +25087,13 @@ class inline_tdata_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "inline_tdata_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { int lcm_sym3__; int lcm_sym2__; @@ -25951,11 +25123,7 @@ class inline_tdata_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { local_scalar_t__ alpha; current_statement__ = 1; @@ -25972,11 +25140,7 @@ class inline_tdata_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "alpha", "double", @@ -26122,10 +25286,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return inline_tdata_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --O --print-cpp inliner-same-names.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace inliner_same_names_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -26155,15 +25328,9 @@ Eigen::Matrix>,-1,1> foo(const T0__& oR_arg__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& oR = stan::math::to_ref(oR_arg__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int lcm_sym13__; { @@ -26190,19 +25357,11 @@ class inliner_same_names_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 6; context__.validate_dims("data initialization", "N", "int", @@ -26240,15 +25399,9 @@ class inliner_same_names_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "inliner_same_names_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { int lcm_sym18__; Eigen::Matrix R = @@ -26288,15 +25441,9 @@ class inliner_same_names_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "inliner_same_names_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { int lcm_sym17__; stan::math::var_value> R = @@ -26339,25 +25486,13 @@ class inliner_same_names_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "inliner_same_names_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { int lcm_sym16__; int lcm_sym15__; @@ -26405,11 +25540,7 @@ class inliner_same_names_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } template * = nullptr> inline void @@ -26418,11 +25549,7 @@ class inliner_same_names_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } inline void get_param_names(std::vector& names__, const bool @@ -26583,10 +25710,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return inliner_same_names_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --O --print-cpp inlining-fail2.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace inlining_fail2_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -26790,14 +25926,8 @@ template ::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int lcm_sym57__; int lcm_sym56__; @@ -26833,14 +25963,8 @@ template ::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int lcm_sym63__; int lcm_sym62__; @@ -26888,16 +26012,10 @@ prob_uncaptured(const T0__& p_arg__, const T1__& phi_arg__, std::ostream* using local_scalar_t__ = stan::promote_args_t, stan::base_type_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& p = stan::math::to_ref(p_arg__); const auto& phi = stan::math::to_ref(phi_arg__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int lcm_sym75__; double lcm_sym74__; @@ -27052,15 +26170,11 @@ jolly_seber_lp(const T0__& y, const T1__& first, const T2__& last, stan::base_type_t, stan::base_type_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& p = stan::math::to_ref(p_arg__); const auto& phi = stan::math::to_ref(phi_arg__); const auto& gamma = stan::math::to_ref(gamma_arg__); const auto& chi = stan::math::to_ref(chi_arg__); local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int lcm_sym125__; int lcm_sym124__; @@ -27573,15 +26687,9 @@ Eigen::Matrix>,-1,1> seq_cprob(const T0__& gamma_arg__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& gamma = stan::math::to_ref(gamma_arg__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { double lcm_sym133__; int lcm_sym132__; @@ -27657,19 +26765,11 @@ class inlining_fail2_model final : public model_base_crtp random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "inlining_fail2_model_namespace::inlining_fail2_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__; pos__ = 1; @@ -27854,15 +26954,9 @@ class inlining_fail2_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "inlining_fail2_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { int lcm_sym347__; int lcm_sym346__; @@ -28751,15 +27845,9 @@ class inlining_fail2_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "inlining_fail2_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { int lcm_sym277__; int lcm_sym276__; @@ -29652,25 +28740,13 @@ class inlining_fail2_model final : public model_base_crtp stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "inlining_fail2_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { double lcm_sym207__; int lcm_sym206__; @@ -30342,11 +29418,7 @@ class inlining_fail2_model final : public model_base_crtp stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { local_scalar_t__ mean_phi; current_statement__ = 1; @@ -30383,11 +29455,7 @@ class inlining_fail2_model final : public model_base_crtp using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "mean_phi", @@ -30753,10 +29821,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return inlining_fail2_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --O --print-cpp lcm-experiment.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace lcm_experiment_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -30783,19 +29860,11 @@ class lcm_experiment_model final : public model_base_crtp random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "lcm_experiment_model_namespace::lcm_experiment_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("data initialization", "j", "int", @@ -30845,15 +29914,9 @@ class lcm_experiment_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "lcm_experiment_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; lp_accum__.add(lp__); return lp_accum__.sum(); } @@ -30871,15 +29934,9 @@ class lcm_experiment_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "lcm_experiment_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; lp_accum__.add(lp__); return lp_accum__.sum(); } @@ -30898,25 +29955,13 @@ class lcm_experiment_model final : public model_base_crtp stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "lcm_experiment_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { int lcm_sym2__; int lcm_sym1__; @@ -30942,11 +29987,7 @@ class lcm_experiment_model final : public model_base_crtp stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } template * = nullptr> inline void @@ -30955,11 +29996,7 @@ class lcm_experiment_model final : public model_base_crtp using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } inline void get_param_names(std::vector& names__, const bool @@ -31092,10 +30129,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return lcm_experiment_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --O --print-cpp lcm-experiment2.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace lcm_experiment2_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -31118,19 +30164,11 @@ class lcm_experiment2_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; num_params_r__ = 1; } inline std::string model_name() const final { @@ -31154,15 +30192,9 @@ class lcm_experiment2_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "lcm_experiment2_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ lcm_sym8__; double lcm_sym7__; @@ -31204,15 +30236,9 @@ class lcm_experiment2_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "lcm_experiment2_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ lcm_sym5__; double lcm_sym4__; @@ -31255,25 +30281,13 @@ class lcm_experiment2_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "lcm_experiment2_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { int lcm_sym2__; int lcm_sym1__; @@ -31303,11 +30317,7 @@ class lcm_experiment2_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { local_scalar_t__ x; current_statement__ = 1; @@ -31324,11 +30334,7 @@ class lcm_experiment2_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "x", "double", @@ -31474,10 +30480,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return lcm_experiment2_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --O --print-cpp lcm-fails.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace lcm_fails_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -31500,19 +30515,11 @@ class lcm_fails_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "lcm_fails_model_namespace::lcm_fails_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 3; context__.validate_dims("data initialization", "J", "int", @@ -31558,15 +30565,9 @@ class lcm_fails_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "lcm_fails_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { double lcm_sym4__; std::vector theta = @@ -31597,15 +30598,9 @@ class lcm_fails_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "lcm_fails_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { double lcm_sym3__; std::vector theta = @@ -31637,25 +30632,13 @@ class lcm_fails_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "lcm_fails_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { int lcm_sym2__; int lcm_sym1__; @@ -31686,11 +30669,7 @@ class lcm_fails_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { std::vector theta; current_statement__ = 1; @@ -31708,11 +30687,7 @@ class lcm_fails_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "theta", "double", @@ -31866,10 +30841,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return lcm_fails_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --O --print-cpp lcm-fails2.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace lcm_fails2_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -31964,14 +30948,8 @@ template ::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int lcm_sym25__; int lcm_sym24__; @@ -32007,14 +30985,8 @@ template ::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int lcm_sym31__; int lcm_sym30__; @@ -32063,16 +31035,10 @@ prob_uncaptured(const T0__& nind, const T1__& n_occasions, const T2__& using local_scalar_t__ = stan::promote_args_t, stan::base_type_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& p = stan::math::to_ref(p_arg__); const auto& phi = stan::math::to_ref(phi_arg__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { double lcm_sym41__; double lcm_sym40__; @@ -32212,19 +31178,11 @@ class lcm_fails2_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "lcm_fails2_model_namespace::lcm_fails2_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__; pos__ = 1; @@ -32390,15 +31348,9 @@ class lcm_fails2_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "lcm_fails2_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { double lcm_sym142__; int lcm_sym141__; @@ -32801,15 +31753,9 @@ class lcm_fails2_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "lcm_fails2_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { double lcm_sym103__; int lcm_sym102__; @@ -33212,25 +32158,13 @@ class lcm_fails2_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "lcm_fails2_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { double lcm_sym64__; int lcm_sym63__; @@ -33527,11 +32461,7 @@ class lcm_fails2_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { local_scalar_t__ mean_phi; current_statement__ = 1; @@ -33552,11 +32482,7 @@ class lcm_fails2_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "mean_phi", @@ -33766,10 +32692,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return lcm_fails2_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --O --print-cpp lupdf-inlining.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace lupdf_inlining_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -33815,11 +32750,7 @@ stan::promote_args_t foo_lpdf(const T0__& x, const T1__& mu, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { double lcm_sym30__; { @@ -33839,11 +32770,7 @@ stan::promote_args_t bar_lpmf(const T0__& n, const T1__& mu, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { double lcm_sym31__; { @@ -33861,11 +32788,7 @@ template baz_lpdf(const T0__& x, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { double lcm_sym32__; { @@ -33885,19 +32808,11 @@ class lupdf_inlining_model final : public model_base_crtp random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "lupdf_inlining_model_namespace::lupdf_inlining_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 6; context__.validate_dims("data initialization", "n", "int", @@ -33931,15 +32846,9 @@ class lupdf_inlining_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "lupdf_inlining_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ lcm_sym43__; local_scalar_t__ lcm_sym42__; @@ -33988,15 +32897,9 @@ class lupdf_inlining_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "lupdf_inlining_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ lcm_sym40__; local_scalar_t__ lcm_sym39__; @@ -34046,25 +32949,13 @@ class lupdf_inlining_model final : public model_base_crtp stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "lupdf_inlining_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { double lcm_sym37__; double lcm_sym36__; @@ -34123,11 +33014,7 @@ class lupdf_inlining_model final : public model_base_crtp stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { local_scalar_t__ mu; current_statement__ = 1; @@ -34144,11 +33031,7 @@ class lupdf_inlining_model final : public model_base_crtp using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "mu", "double", @@ -34321,10 +33204,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return lupdf_inlining_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --O --print-cpp off-dce.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace off_dce_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -34409,19 +33301,11 @@ class off_dce_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "off_dce_model_namespace::off_dce_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__; pos__ = 1; @@ -34595,15 +33479,9 @@ class off_dce_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "off_dce_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { int lcm_sym41__; int lcm_sym40__; @@ -34720,15 +33598,9 @@ class off_dce_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "off_dce_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { int lcm_sym30__; int lcm_sym29__; @@ -34846,25 +33718,13 @@ class off_dce_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "off_dce_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { double lcm_sym19__; double lcm_sym11__; @@ -35038,11 +33898,7 @@ class off_dce_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { local_scalar_t__ alpha_occ; current_statement__ = 1; @@ -35071,11 +33927,7 @@ class off_dce_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "alpha_occ", @@ -35319,10 +34171,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return off_dce_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --O --print-cpp off-small.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace off_small_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -35388,19 +34249,11 @@ class off_small_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "off_small_model_namespace::off_small_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__; pos__ = 1; @@ -35549,15 +34402,9 @@ class off_small_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "off_small_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { double lcm_sym35__; double lcm_sym34__; @@ -35684,15 +34531,9 @@ class off_small_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "off_small_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { double lcm_sym24__; double lcm_sym23__; @@ -35820,25 +34661,13 @@ class off_small_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "off_small_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix lcm_sym13__; double lcm_sym12__; @@ -35965,11 +34794,7 @@ class off_small_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { local_scalar_t__ beta; current_statement__ = 1; @@ -36018,11 +34843,7 @@ class off_small_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "beta", "double", @@ -36331,10 +35152,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return off_small_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --O --print-cpp optimizations.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace optimizations_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -36457,11 +35287,7 @@ nrfun_lp(const T0__& x, const T1__& y, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int lcm_sym55__; { @@ -36482,14 +35308,8 @@ template >*> int rfun(const T0__& y, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int lcm_sym58__; int lcm_sym57__; @@ -36512,11 +35332,7 @@ template int rfun_lp(T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 58; lp_accum__.add(2); @@ -36535,19 +35351,11 @@ class optimizations_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "optimizations_model_namespace::optimizations_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; num_params_r__ = 1 + 1 + (3 * 2) + 2 + 3; } inline std::string model_name() const final { @@ -36571,15 +35379,9 @@ class optimizations_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "optimizations_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { double lcm_sym115__; double lcm_sym114__; @@ -37108,15 +35910,9 @@ class optimizations_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "optimizations_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { double lcm_sym91__; double lcm_sym90__; @@ -37648,25 +36444,13 @@ class optimizations_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "optimizations_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { int lcm_sym67__; int lcm_sym66__; @@ -37714,11 +36498,7 @@ class optimizations_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { local_scalar_t__ theta; current_statement__ = 1; @@ -37757,11 +36537,7 @@ class optimizations_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "theta", "double", @@ -38070,10 +36846,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return optimizations_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --O --print-cpp overloaded-fn.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace overloaded_fn_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -38099,14 +36884,8 @@ template dumb(const T0__& x, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { double lcm_sym1__; { @@ -38122,14 +36901,8 @@ template >*> double dumb(const T0__& x, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { double lcm_sym2__; { @@ -38149,19 +36922,11 @@ class overloaded_fn_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "overloaded_fn_model_namespace::overloaded_fn_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; num_params_r__ = 0U; } inline std::string model_name() const final { @@ -38185,15 +36950,9 @@ class overloaded_fn_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "overloaded_fn_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { double lcm_sym6__; { @@ -38220,15 +36979,9 @@ class overloaded_fn_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "overloaded_fn_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { double lcm_sym5__; { @@ -38256,25 +37009,13 @@ class overloaded_fn_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "overloaded_fn_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { int lcm_sym4__; int lcm_sym3__; @@ -38300,11 +37041,7 @@ class overloaded_fn_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } template * = nullptr> inline void @@ -38313,11 +37050,7 @@ class overloaded_fn_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } inline void get_param_names(std::vector& names__, const bool @@ -38450,10 +37183,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return overloaded_fn_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --O --print-cpp overloaded-fn2.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace overloaded_fn2_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -38487,15 +37229,9 @@ stan::promote_args_t> foo(const T0__& x_arg__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& x = stan::math::to_ref(x_arg__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { double lcm_sym3__; { @@ -38511,11 +37247,7 @@ template void bar_lp(T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { double lcm_sym4__; { @@ -38535,14 +37267,8 @@ Eigen::Matrix,-1,1> foo(const T0__& x, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { Eigen::Matrix lcm_sym5__; { @@ -38562,19 +37288,11 @@ class overloaded_fn2_model final : public model_base_crtp random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "overloaded_fn2_model_namespace::overloaded_fn2_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; num_params_r__ = 0U; } inline std::string model_name() const final { @@ -38598,15 +37316,9 @@ class overloaded_fn2_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "overloaded_fn2_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { double lcm_sym9__; { @@ -38634,15 +37346,9 @@ class overloaded_fn2_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "overloaded_fn2_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { double lcm_sym8__; { @@ -38671,25 +37377,13 @@ class overloaded_fn2_model final : public model_base_crtp stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "overloaded_fn2_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { int lcm_sym7__; int lcm_sym6__; @@ -38715,11 +37409,7 @@ class overloaded_fn2_model final : public model_base_crtp stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } template * = nullptr> inline void @@ -38728,11 +37418,7 @@ class overloaded_fn2_model final : public model_base_crtp using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } inline void get_param_names(std::vector& names__, const bool @@ -38865,10 +37551,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return overloaded_fn2_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --O --print-cpp partial-eval-tuple.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace partial_eval_tuple_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -38888,19 +37583,11 @@ class partial_eval_tuple_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; num_params_r__ = 0U; } inline std::string model_name() const final { @@ -38924,15 +37611,9 @@ class partial_eval_tuple_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "partial_eval_tuple_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { double lcm_sym6__; std::tuple> x; @@ -38964,15 +37645,9 @@ class partial_eval_tuple_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "partial_eval_tuple_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { double lcm_sym5__; std::tuple> x; @@ -39005,25 +37680,13 @@ class partial_eval_tuple_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "partial_eval_tuple_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix lcm_sym4__; double lcm_sym3__; @@ -39062,11 +37725,7 @@ class partial_eval_tuple_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } template * = nullptr> inline void @@ -39075,11 +37734,7 @@ class partial_eval_tuple_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } inline void get_param_names(std::vector& names__, const bool @@ -39245,10 +37900,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return partial_eval_tuple_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --O --print-cpp partial-eval.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace partial_eval_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -39307,19 +37971,11 @@ class partial_eval_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "partial_eval_model_namespace::partial_eval_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__; pos__ = 1; @@ -39467,15 +38123,9 @@ class partial_eval_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "partial_eval_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { std::complex lcm_sym31__; std::complex lcm_sym30__; @@ -39583,15 +38233,9 @@ class partial_eval_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "partial_eval_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { std::complex lcm_sym21__; std::complex lcm_sym20__; @@ -39700,25 +38344,13 @@ class partial_eval_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "partial_eval_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { double lcm_sym11__; double lcm_sym10__; @@ -39809,11 +38441,7 @@ class partial_eval_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { Eigen::Matrix a; current_statement__ = 1; @@ -39850,11 +38478,7 @@ class partial_eval_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "a", "double", @@ -40115,10 +38739,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return partial_eval_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --O --print-cpp partial_eval_multiply.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace partial_eval_multiply_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -40154,19 +38787,11 @@ class partial_eval_multiply_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__; pos__ = 1; @@ -41440,15 +40065,9 @@ class partial_eval_multiply_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "partial_eval_multiply_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix lcm_sym13__; Eigen::Matrix lcm_sym12__; @@ -41502,15 +40121,9 @@ class partial_eval_multiply_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "partial_eval_multiply_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix lcm_sym10__; Eigen::Matrix lcm_sym9__; @@ -41567,25 +40180,13 @@ class partial_eval_multiply_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "partial_eval_multiply_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { int lcm_sym7__; int lcm_sym6__; @@ -41619,11 +40220,7 @@ class partial_eval_multiply_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { Eigen::Matrix m2; current_statement__ = 1; @@ -41648,11 +40245,7 @@ class partial_eval_multiply_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "m2", "double", @@ -43055,10 +41648,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return partial_eval_multiply_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --O --print-cpp partial_eval_zeros.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace partial_eval_zeros_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -43083,19 +41685,11 @@ class partial_eval_zeros_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__; pos__ = 1; @@ -43148,15 +41742,9 @@ class partial_eval_zeros_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "partial_eval_zeros_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; lp_accum__.add(lp__); return lp_accum__.sum(); } @@ -43174,15 +41762,9 @@ class partial_eval_zeros_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "partial_eval_zeros_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; lp_accum__.add(lp__); return lp_accum__.sum(); } @@ -43201,25 +41783,13 @@ class partial_eval_zeros_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "partial_eval_zeros_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { int lcm_sym2__; int lcm_sym1__; @@ -43245,11 +41815,7 @@ class partial_eval_zeros_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } template * = nullptr> inline void @@ -43258,11 +41824,7 @@ class partial_eval_zeros_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } inline void get_param_names(std::vector& names__, const bool @@ -43395,10 +41957,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return partial_eval_zeros_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --O --print-cpp stalled1-failure.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace stalled1_failure_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -43463,19 +42034,11 @@ class stalled1_failure_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__; pos__ = 1; @@ -43604,15 +42167,9 @@ class stalled1_failure_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "stalled1_failure_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { double lcm_sym34__; double lcm_sym33__; @@ -43733,15 +42290,9 @@ class stalled1_failure_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "stalled1_failure_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { double lcm_sym23__; double lcm_sym22__; @@ -43866,25 +42417,13 @@ class stalled1_failure_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "stalled1_failure_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { double lcm_sym12__; double lcm_sym11__; @@ -44046,11 +42585,7 @@ class stalled1_failure_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { local_scalar_t__ alpha0; current_statement__ = 1; @@ -44096,11 +42631,7 @@ class stalled1_failure_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "alpha0", "double", @@ -44444,10 +42975,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return stalled1_failure_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --O --print-cpp unenforce-initialize-should-fail.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace unenforce_initialize_should_fail_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -44472,19 +43012,11 @@ class unenforce_initialize_should_fail_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__; pos__ = 1; @@ -44522,15 +43054,9 @@ class unenforce_initialize_should_fail_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "unenforce_initialize_should_fail_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { double lcm_sym23__; std::vector> lcm_sym22__; @@ -44646,15 +43172,9 @@ class unenforce_initialize_should_fail_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "unenforce_initialize_should_fail_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { double lcm_sym17__; std::vector> lcm_sym16__; @@ -44771,25 +43291,13 @@ class unenforce_initialize_should_fail_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "unenforce_initialize_should_fail_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { double lcm_sym11__; double lcm_sym10__; @@ -44956,11 +43464,7 @@ class unenforce_initialize_should_fail_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { local_scalar_t__ param; current_statement__ = 1; @@ -44977,11 +43481,7 @@ class unenforce_initialize_should_fail_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "param", "double", @@ -45151,10 +43651,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return unenforce_initialize_should_fail_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --O --print-cpp unenforce-initialize.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace unenforce_initialize_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -45181,19 +43690,11 @@ class unenforce_initialize_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; num_params_r__ = 1; } inline std::string model_name() const final { @@ -45217,15 +43718,9 @@ class unenforce_initialize_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "unenforce_initialize_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { double lcm_sym11__; double lcm_sym10__; @@ -45308,15 +43803,9 @@ class unenforce_initialize_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "unenforce_initialize_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { double lcm_sym8__; double lcm_sym7__; @@ -45400,25 +43889,13 @@ class unenforce_initialize_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "unenforce_initialize_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { double lcm_sym5__; double lcm_sym4__; @@ -45514,11 +43991,7 @@ class unenforce_initialize_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { local_scalar_t__ y; current_statement__ = 1; @@ -45535,11 +44008,7 @@ class unenforce_initialize_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "y", "double", @@ -45715,11 +44184,20 @@ stan::math::profile_map& get_stan_profile_data() { return unenforce_initialize_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif Warning in 'unenforce-initialize.stan', line 8, column 2: Assignment of variable to itself during declaration. This is almost certainly a bug. $ ../../../../../install/default/bin/stanc --O --print-cpp unroll-limit.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace unroll_limit_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -45748,19 +44226,11 @@ class unroll_limit_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "unroll_limit_model_namespace::unroll_limit_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; num_params_r__ = 0U; } inline std::string model_name() const final { @@ -45784,15 +44254,9 @@ class unroll_limit_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "unroll_limit_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; lp_accum__.add(lp__); return lp_accum__.sum(); } @@ -45810,15 +44274,9 @@ class unroll_limit_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "unroll_limit_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; lp_accum__.add(lp__); return lp_accum__.sum(); } @@ -45837,25 +44295,13 @@ class unroll_limit_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "unroll_limit_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { int lcm_sym12__; int lcm_sym11__; @@ -46157,11 +44603,7 @@ class unroll_limit_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } template * = nullptr> inline void @@ -46170,11 +44612,7 @@ class unroll_limit_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } inline void get_param_names(std::vector& names__, const bool @@ -46320,3 +44758,6 @@ stan::math::profile_map& get_stan_profile_data() { return unroll_limit_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif diff --git a/test/integration/good/compiler-optimizations/cppO0.expected b/test/integration/good/compiler-optimizations/cppO0.expected index 2b1ba1011..d94ae5427 100644 --- a/test/integration/good/compiler-optimizations/cppO0.expected +++ b/test/integration/good/compiler-optimizations/cppO0.expected @@ -1,6 +1,12 @@ $ ../../../../../install/default/bin/stanc --print-cpp --O0 ad-level-deep-dependence.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace ad_level_deep_dependence_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -28,19 +34,11 @@ class ad_level_deep_dependence_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__ = std::numeric_limits::min(); pos__ = 1; @@ -91,15 +89,9 @@ class ad_level_deep_dependence_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "ad_level_deep_dependence_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix X_p = Eigen::Matrix::Constant(10, 10, DUMMY_VAR__); @@ -161,15 +153,9 @@ class ad_level_deep_dependence_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "ad_level_deep_dependence_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix X_p = Eigen::Matrix::Constant(10, 10, DUMMY_VAR__); @@ -232,25 +218,13 @@ class ad_level_deep_dependence_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "ad_level_deep_dependence_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix X_p = Eigen::Matrix::Constant(10, 10, @@ -332,11 +306,7 @@ class ad_level_deep_dependence_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { Eigen::Matrix X_p = Eigen::Matrix::Constant(10, 10, DUMMY_VAR__); @@ -356,11 +326,7 @@ class ad_level_deep_dependence_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "X_p", "double", @@ -647,10 +613,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return ad_level_deep_dependence_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --print-cpp --O0 ad-level-failing.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace ad_level_failing_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -783,14 +758,8 @@ simple_SIR(const T0__& t, const T1__& y, const T2__& theta, const T3__& x_r, stan::base_type_t, stan::base_type_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { std::vector dydt = std::vector(4, DUMMY_VAR__); @@ -847,19 +816,11 @@ class ad_level_failing_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 17; context__.validate_dims("data initialization", "N_t", "int", @@ -942,15 +903,9 @@ class ad_level_failing_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "ad_level_failing_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ beta = DUMMY_VAR__; current_statement__ = 1; @@ -1042,15 +997,9 @@ class ad_level_failing_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "ad_level_failing_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ beta = DUMMY_VAR__; current_statement__ = 1; @@ -1143,25 +1092,13 @@ class ad_level_failing_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "ad_level_failing_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { double beta = std::numeric_limits::quiet_NaN(); current_statement__ = 1; @@ -1230,11 +1167,7 @@ class ad_level_failing_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { local_scalar_t__ beta = DUMMY_VAR__; current_statement__ = 1; @@ -1263,11 +1196,7 @@ class ad_level_failing_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "beta", "double", @@ -1467,6 +1396,9 @@ stan::math::profile_map& get_stan_profile_data() { return ad_level_failing_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif Warning in 'ad-level-failing.stan', line 46, column 8: integrate_ode_rk45 is deprecated and will be removed in Stan 3.0. Use ode_rk45 instead. The new interface is slightly different, see: @@ -1474,6 +1406,12 @@ Warning in 'ad-level-failing.stan', line 46, column 8: integrate_ode_rk45 is $ ../../../../../install/default/bin/stanc --print-cpp --O0 ad-levels-deep.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace ad_levels_deep_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -1495,19 +1433,11 @@ class ad_levels_deep_model final : public model_base_crtp random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "ad_levels_deep_model_namespace::ad_levels_deep_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__ = std::numeric_limits::min(); pos__ = 1; @@ -1558,15 +1488,9 @@ class ad_levels_deep_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "ad_levels_deep_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix X_p = Eigen::Matrix::Constant(10, 10, DUMMY_VAR__); @@ -1604,15 +1528,9 @@ class ad_levels_deep_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "ad_levels_deep_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix X_p = Eigen::Matrix::Constant(10, 10, DUMMY_VAR__); @@ -1651,25 +1569,13 @@ class ad_levels_deep_model final : public model_base_crtp stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "ad_levels_deep_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix X_p = Eigen::Matrix::Constant(10, 10, @@ -1717,11 +1623,7 @@ class ad_levels_deep_model final : public model_base_crtp stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { Eigen::Matrix X_p = Eigen::Matrix::Constant(10, 10, DUMMY_VAR__); @@ -1741,11 +1643,7 @@ class ad_levels_deep_model final : public model_base_crtp using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "X_p", "double", @@ -1959,10 +1857,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return ad_levels_deep_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --print-cpp --O0 copy-prop-profile.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace copy_prop_profile_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -1996,19 +1903,11 @@ class copy_prop_profile_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 16; context__.validate_dims("data initialization", "N", "int", @@ -2048,15 +1947,9 @@ class copy_prop_profile_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "copy_prop_profile_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix X = Eigen::Matrix::Constant(N, N, DUMMY_VAR__); @@ -2121,15 +2014,9 @@ class copy_prop_profile_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "copy_prop_profile_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix X = Eigen::Matrix::Constant(N, N, DUMMY_VAR__); @@ -2195,25 +2082,13 @@ class copy_prop_profile_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "copy_prop_profile_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix X = Eigen::Matrix::Constant(N, N, @@ -2243,11 +2118,7 @@ class copy_prop_profile_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { Eigen::Matrix X = Eigen::Matrix::Constant(N, N, DUMMY_VAR__); @@ -2267,11 +2138,7 @@ class copy_prop_profile_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "X", "double", @@ -2444,10 +2311,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return copy_prop_profile_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --print-cpp --O0 copy_fail.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace copy_fail_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -2554,14 +2430,8 @@ template ::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 53; for (int k = 1; k <= stan::math::size(y_i); ++k) { @@ -2584,14 +2454,8 @@ template ::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 60; for (int k_rev = 0; k_rev <= (stan::math::size(y_i) - 1); ++k_rev) { @@ -2624,16 +2488,10 @@ prob_uncaptured(const T0__& nind, const T1__& n_occasions, const T2__& using local_scalar_t__ = stan::promote_args_t, stan::base_type_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& p = stan::math::to_ref(p_arg__); const auto& phi = stan::math::to_ref(phi_arg__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 63; stan::math::validate_non_negative_index("chi", "nind", nind); @@ -2690,19 +2548,11 @@ class copy_fail_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "copy_fail_model_namespace::copy_fail_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__ = std::numeric_limits::min(); pos__ = 1; @@ -2868,15 +2718,9 @@ class copy_fail_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "copy_fail_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ mean_p = DUMMY_VAR__; current_statement__ = 1; @@ -2998,15 +2842,9 @@ class copy_fail_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "copy_fail_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ mean_p = DUMMY_VAR__; current_statement__ = 1; @@ -3129,25 +2967,13 @@ class copy_fail_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "copy_fail_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { double mean_p = std::numeric_limits::quiet_NaN(); current_statement__ = 1; @@ -3243,11 +3069,7 @@ class copy_fail_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { local_scalar_t__ mean_p = DUMMY_VAR__; current_statement__ = 1; @@ -3271,11 +3093,7 @@ class copy_fail_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "mean_p", "double", @@ -3503,10 +3321,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return copy_fail_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --print-cpp --O0 dce-fail.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace dce_fail_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -3600,19 +3427,11 @@ class dce_fail_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "dce_fail_model_namespace::dce_fail_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__ = std::numeric_limits::min(); pos__ = 1; @@ -3800,15 +3619,9 @@ class dce_fail_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "dce_fail_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ sigma = DUMMY_VAR__; current_statement__ = 1; @@ -3986,15 +3799,9 @@ class dce_fail_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "dce_fail_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ sigma = DUMMY_VAR__; current_statement__ = 1; @@ -4173,25 +3980,13 @@ class dce_fail_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "dce_fail_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { double sigma = std::numeric_limits::quiet_NaN(); current_statement__ = 1; @@ -4298,11 +4093,7 @@ class dce_fail_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { local_scalar_t__ sigma = DUMMY_VAR__; current_statement__ = 1; @@ -4395,11 +4186,7 @@ class dce_fail_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "sigma", "double", @@ -4790,10 +4577,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return dce_fail_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --print-cpp --O0 expr-prop-experiment.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace expr_prop_experiment_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -4822,19 +4618,11 @@ class expr_prop_experiment_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("data initialization", "j", "int", @@ -4886,15 +4674,9 @@ class expr_prop_experiment_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "expr_prop_experiment_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; lp_accum__.add(lp__); return lp_accum__.sum(); } @@ -4912,15 +4694,9 @@ class expr_prop_experiment_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "expr_prop_experiment_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; lp_accum__.add(lp__); return lp_accum__.sum(); } @@ -4939,25 +4715,13 @@ class expr_prop_experiment_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "expr_prop_experiment_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { if (stan::math::logical_negation( (stan::math::primitive_value(emit_transformed_parameters__) || @@ -4981,11 +4745,7 @@ class expr_prop_experiment_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } template * = nullptr> inline void @@ -4994,11 +4754,7 @@ class expr_prop_experiment_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } inline void get_param_names(std::vector& names__, const bool @@ -5131,10 +4887,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return expr_prop_experiment_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --print-cpp --O0 expr-prop-experiment2.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace expr_prop_experiment2_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -5160,19 +4925,11 @@ class expr_prop_experiment2_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("data initialization", "j", "int", @@ -5223,15 +4980,9 @@ class expr_prop_experiment2_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "expr_prop_experiment2_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; lp_accum__.add(lp__); return lp_accum__.sum(); } @@ -5249,15 +5000,9 @@ class expr_prop_experiment2_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "expr_prop_experiment2_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; lp_accum__.add(lp__); return lp_accum__.sum(); } @@ -5276,25 +5021,13 @@ class expr_prop_experiment2_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "expr_prop_experiment2_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { if (stan::math::logical_negation( (stan::math::primitive_value(emit_transformed_parameters__) || @@ -5318,11 +5051,7 @@ class expr_prop_experiment2_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } template * = nullptr> inline void @@ -5331,11 +5060,7 @@ class expr_prop_experiment2_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } inline void get_param_names(std::vector& names__, const bool @@ -5468,10 +5193,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return expr_prop_experiment2_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --print-cpp --O0 expr-prop-fail.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace expr_prop_fail_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -5500,19 +5234,11 @@ class expr_prop_fail_model final : public model_base_crtp random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "expr_prop_fail_model_namespace::expr_prop_fail_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__ = std::numeric_limits::min(); pos__ = 1; @@ -5569,15 +5295,9 @@ class expr_prop_fail_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "expr_prop_fail_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix mu = Eigen::Matrix::Constant(2, DUMMY_VAR__); @@ -5640,15 +5360,9 @@ class expr_prop_fail_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "expr_prop_fail_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix mu = Eigen::Matrix::Constant(2, DUMMY_VAR__); @@ -5712,25 +5426,13 @@ class expr_prop_fail_model final : public model_base_crtp stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "expr_prop_fail_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix mu = Eigen::Matrix::Constant(2, @@ -5772,11 +5474,7 @@ class expr_prop_fail_model final : public model_base_crtp stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { Eigen::Matrix mu = Eigen::Matrix::Constant(2, DUMMY_VAR__); @@ -5806,11 +5504,7 @@ class expr_prop_fail_model final : public model_base_crtp using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "mu", "double", @@ -6002,10 +5696,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return expr_prop_fail_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --print-cpp --O0 expr-prop-fail2.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace expr_prop_fail2_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -6034,19 +5737,11 @@ class expr_prop_fail2_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 6; context__.validate_dims("data initialization", "J", "int", @@ -6103,15 +5798,9 @@ class expr_prop_fail2_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "expr_prop_fail2_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ mu = DUMMY_VAR__; current_statement__ = 1; @@ -6150,15 +5839,9 @@ class expr_prop_fail2_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "expr_prop_fail2_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ mu = DUMMY_VAR__; current_statement__ = 1; @@ -6198,25 +5881,13 @@ class expr_prop_fail2_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "expr_prop_fail2_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { double mu = std::numeric_limits::quiet_NaN(); current_statement__ = 1; @@ -6254,11 +5925,7 @@ class expr_prop_fail2_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { local_scalar_t__ mu = DUMMY_VAR__; current_statement__ = 1; @@ -6285,11 +5952,7 @@ class expr_prop_fail2_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "mu", "double", @@ -6462,10 +6125,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return expr_prop_fail2_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --print-cpp --O0 expr-prop-fail3.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace expr_prop_fail3_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -6549,19 +6221,11 @@ class expr_prop_fail3_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__ = std::numeric_limits::min(); pos__ = 1; @@ -6798,15 +6462,9 @@ class expr_prop_fail3_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "expr_prop_fail3_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix a = Eigen::Matrix::Constant(n_age, DUMMY_VAR__); @@ -6929,15 +6587,9 @@ class expr_prop_fail3_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "expr_prop_fail3_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix a = Eigen::Matrix::Constant(n_age, DUMMY_VAR__); @@ -7061,25 +6713,13 @@ class expr_prop_fail3_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "expr_prop_fail3_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix a = Eigen::Matrix::Constant(n_age, @@ -7207,11 +6847,7 @@ class expr_prop_fail3_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { Eigen::Matrix a = Eigen::Matrix::Constant(n_age, DUMMY_VAR__); @@ -7288,11 +6924,7 @@ class expr_prop_fail3_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "a", "double", @@ -7660,10 +7292,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return expr_prop_fail3_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --print-cpp --O0 expr-prop-fail4.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace expr_prop_fail4_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -7732,19 +7373,11 @@ class expr_prop_fail4_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__ = std::numeric_limits::min(); pos__ = 1; @@ -7862,15 +7495,9 @@ class expr_prop_fail4_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "expr_prop_fail4_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ tau_phi = DUMMY_VAR__; current_statement__ = 1; @@ -7930,15 +7557,9 @@ class expr_prop_fail4_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "expr_prop_fail4_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ tau_phi = DUMMY_VAR__; current_statement__ = 1; @@ -7999,25 +7620,13 @@ class expr_prop_fail4_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "expr_prop_fail4_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { double tau_phi = std::numeric_limits::quiet_NaN(); current_statement__ = 1; @@ -8139,11 +7748,7 @@ class expr_prop_fail4_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { local_scalar_t__ tau_phi = DUMMY_VAR__; current_statement__ = 1; @@ -8168,11 +7773,7 @@ class expr_prop_fail4_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "tau_phi", @@ -8430,10 +8031,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return expr_prop_fail4_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --print-cpp --O0 expr-prop-fail5.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace expr_prop_fail5_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -8545,14 +8155,8 @@ template ::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 56; for (int k = 1; k <= stan::math::size(y_i); ++k) { @@ -8575,14 +8179,8 @@ template ::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 63; for (int k_rev = 0; k_rev <= (stan::math::size(y_i) - 1); ++k_rev) { @@ -8615,16 +8213,10 @@ prob_uncaptured(const T0__& nind, const T1__& n_occasions, const T2__& using local_scalar_t__ = stan::promote_args_t, stan::base_type_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& p = stan::math::to_ref(p_arg__); const auto& phi = stan::math::to_ref(phi_arg__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 66; stan::math::validate_non_negative_index("chi", "nind", nind); @@ -8683,19 +8275,11 @@ class expr_prop_fail5_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__ = std::numeric_limits::min(); pos__ = 1; @@ -8823,15 +8407,9 @@ class expr_prop_fail5_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "expr_prop_fail5_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ mean_phi = DUMMY_VAR__; current_statement__ = 1; @@ -8964,15 +8542,9 @@ class expr_prop_fail5_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "expr_prop_fail5_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ mean_phi = DUMMY_VAR__; current_statement__ = 1; @@ -9106,25 +8678,13 @@ class expr_prop_fail5_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "expr_prop_fail5_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { double mean_phi = std::numeric_limits::quiet_NaN(); current_statement__ = 1; @@ -9238,11 +8798,7 @@ class expr_prop_fail5_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { local_scalar_t__ mean_phi = DUMMY_VAR__; current_statement__ = 1; @@ -9274,11 +8830,7 @@ class expr_prop_fail5_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "mean_phi", @@ -9541,10 +9093,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return expr_prop_fail5_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --print-cpp --O0 expr-prop-fail6.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace expr_prop_fail6_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -9757,14 +9318,8 @@ template ::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 97; for (int k = 1; k <= stan::math::size(y_i); ++k) { @@ -9787,14 +9342,8 @@ template ::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 104; for (int k_rev = 0; k_rev <= (stan::math::size(y_i) - 1); ++k_rev) { @@ -9826,16 +9375,10 @@ prob_uncaptured(const T0__& p_arg__, const T1__& phi_arg__, std::ostream* using local_scalar_t__ = stan::promote_args_t, stan::base_type_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& p = stan::math::to_ref(p_arg__); const auto& phi = stan::math::to_ref(phi_arg__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int n_ind = std::numeric_limits::min(); current_statement__ = 107; @@ -9916,15 +9459,11 @@ js_super_lp(const T0__& y, const T1__& first, const T2__& last, const T3__& stan::base_type_t, stan::base_type_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& p = stan::math::to_ref(p_arg__); const auto& phi = stan::math::to_ref(phi_arg__); const auto& nu = stan::math::to_ref(nu_arg__); const auto& chi = stan::math::to_ref(chi_arg__); local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int n_ind = std::numeric_limits::min(); current_statement__ = 122; @@ -10146,19 +9685,11 @@ class expr_prop_fail6_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__ = std::numeric_limits::min(); pos__ = 1; @@ -10301,15 +9832,9 @@ class expr_prop_fail6_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "expr_prop_fail6_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ mean_phi = DUMMY_VAR__; current_statement__ = 1; @@ -10441,15 +9966,9 @@ class expr_prop_fail6_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "expr_prop_fail6_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ mean_phi = DUMMY_VAR__; current_statement__ = 1; @@ -10582,25 +10101,13 @@ class expr_prop_fail6_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "expr_prop_fail6_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { double mean_phi = std::numeric_limits::quiet_NaN(); current_statement__ = 1; @@ -10875,11 +10382,7 @@ class expr_prop_fail6_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { local_scalar_t__ mean_phi = DUMMY_VAR__; current_statement__ = 1; @@ -10923,11 +10426,7 @@ class expr_prop_fail6_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "mean_phi", @@ -11281,10 +10780,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return expr_prop_fail6_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --print-cpp --O0 expr-prop-fail7.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace expr_prop_fail7_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -11344,19 +10852,11 @@ class expr_prop_fail7_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__ = std::numeric_limits::min(); pos__ = 1; @@ -11497,15 +10997,9 @@ class expr_prop_fail7_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "expr_prop_fail7_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix pi = Eigen::Matrix::Constant(K, DUMMY_VAR__); @@ -11585,15 +11079,9 @@ class expr_prop_fail7_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "expr_prop_fail7_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix pi = Eigen::Matrix::Constant(K, DUMMY_VAR__); @@ -11674,25 +11162,13 @@ class expr_prop_fail7_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "expr_prop_fail7_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix pi = Eigen::Matrix::Constant(K, @@ -11780,11 +11256,7 @@ class expr_prop_fail7_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { Eigen::Matrix pi = Eigen::Matrix::Constant(K, DUMMY_VAR__); @@ -11820,11 +11292,7 @@ class expr_prop_fail7_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "pi", "double", @@ -12059,10 +11527,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return expr_prop_fail7_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --print-cpp --O0 expr-prop-fail8.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace expr_prop_fail8_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -12108,19 +11585,11 @@ class expr_prop_fail8_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__ = std::numeric_limits::min(); pos__ = 1; @@ -12225,15 +11694,9 @@ class expr_prop_fail8_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "expr_prop_fail8_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ beta0 = DUMMY_VAR__; current_statement__ = 1; @@ -12299,15 +11762,9 @@ class expr_prop_fail8_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "expr_prop_fail8_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ beta0 = DUMMY_VAR__; current_statement__ = 1; @@ -12374,25 +11831,13 @@ class expr_prop_fail8_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "expr_prop_fail8_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { double beta0 = std::numeric_limits::quiet_NaN(); current_statement__ = 1; @@ -12467,11 +11912,7 @@ class expr_prop_fail8_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { local_scalar_t__ beta0 = DUMMY_VAR__; current_statement__ = 1; @@ -12514,11 +11955,7 @@ class expr_prop_fail8_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "beta0", "double", @@ -12770,10 +12207,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return expr_prop_fail8_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --print-cpp --O0 fails-test.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace fails_test_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -12880,14 +12326,8 @@ template ::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 53; for (int k = 1; k <= stan::math::size(y_i); ++k) { @@ -12910,14 +12350,8 @@ template ::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 60; for (int k_rev = 0; k_rev <= (stan::math::size(y_i) - 1); ++k_rev) { @@ -12950,16 +12384,10 @@ prob_uncaptured(const T0__& nind, const T1__& n_occasions, const T2__& using local_scalar_t__ = stan::promote_args_t, stan::base_type_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& p = stan::math::to_ref(p_arg__); const auto& phi = stan::math::to_ref(phi_arg__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 63; stan::math::validate_non_negative_index("chi", "nind", nind); @@ -13016,19 +12444,11 @@ class fails_test_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "fails_test_model_namespace::fails_test_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__ = std::numeric_limits::min(); pos__ = 1; @@ -13194,15 +12614,9 @@ class fails_test_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "fails_test_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ mean_p = DUMMY_VAR__; current_statement__ = 1; @@ -13324,15 +12738,9 @@ class fails_test_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "fails_test_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ mean_p = DUMMY_VAR__; current_statement__ = 1; @@ -13455,25 +12863,13 @@ class fails_test_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "fails_test_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { double mean_p = std::numeric_limits::quiet_NaN(); current_statement__ = 1; @@ -13569,11 +12965,7 @@ class fails_test_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { local_scalar_t__ mean_p = DUMMY_VAR__; current_statement__ = 1; @@ -13597,11 +12989,7 @@ class fails_test_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "mean_p", "double", @@ -13829,10 +13217,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return fails_test_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --print-cpp --O0 function-in-function-inline.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace function_in_function_inline_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -13864,12 +13261,8 @@ stan::promote_args_t> inner_lpdf(const T0__& phi_arg__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& phi = stan::math::to_ref(phi_arg__); local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 4; return stan::math::sum(phi); @@ -13885,12 +13278,8 @@ stan::promote_args_t> outer_lpdf(const T0__& phi_arg__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& phi = stan::math::to_ref(phi_arg__); local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 6; return inner_lpdf(phi, pstream__); @@ -13909,19 +13298,11 @@ class function_in_function_inline_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__ = std::numeric_limits::min(); pos__ = 1; @@ -13969,15 +13350,9 @@ class function_in_function_inline_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "function_in_function_inline_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ ret = DUMMY_VAR__; current_statement__ = 1; @@ -14004,15 +13379,9 @@ class function_in_function_inline_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "function_in_function_inline_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ ret = DUMMY_VAR__; current_statement__ = 1; @@ -14040,25 +13409,13 @@ class function_in_function_inline_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "function_in_function_inline_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { if (stan::math::logical_negation( (stan::math::primitive_value(emit_transformed_parameters__) || @@ -14082,11 +13439,7 @@ class function_in_function_inline_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } template * = nullptr> inline void @@ -14095,11 +13448,7 @@ class function_in_function_inline_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } inline void get_param_names(std::vector& names__, const bool @@ -14232,10 +13581,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return function_in_function_inline_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --print-cpp --O0 function-in-function-loops.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace function_in_function_loops_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -14276,14 +13634,8 @@ stan::promote_args_t do_something(const T0__& x, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 8; if (stan::math::logical_eq(2, 3)) { @@ -14305,15 +13657,9 @@ stan::promote_args_t> summer(const T0__& et_arg__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& et = stan::math::to_ref(et_arg__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int N = std::numeric_limits::min(); current_statement__ = 10; @@ -14344,19 +13690,11 @@ class function_in_function_loops_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 5; context__.validate_dims("data initialization", "N", "int", @@ -14390,15 +13728,9 @@ class function_in_function_loops_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "function_in_function_loops_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { current_statement__ = 1; stan::math::validate_non_negative_index("eta", "N", N); @@ -14432,15 +13764,9 @@ class function_in_function_loops_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "function_in_function_loops_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { current_statement__ = 1; stan::math::validate_non_negative_index("eta", "N", N); @@ -14475,25 +13801,13 @@ class function_in_function_loops_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "function_in_function_loops_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { if (stan::math::logical_negation( (stan::math::primitive_value(emit_transformed_parameters__) || @@ -14517,11 +13831,7 @@ class function_in_function_loops_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } template * = nullptr> inline void @@ -14530,11 +13840,7 @@ class function_in_function_loops_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } inline void get_param_names(std::vector& names__, const bool @@ -14667,10 +13973,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return function_in_function_loops_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --print-cpp --O0 fuzz-div0.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace fuzz_div0_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -14689,19 +14004,11 @@ class fuzz_div0_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "fuzz_div0_model_namespace::fuzz_div0_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; num_params_r__ = 0U; } inline std::string model_name() const final { @@ -14725,15 +14032,9 @@ class fuzz_div0_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "fuzz_div0_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { std::vector T = std::vector(6, std::numeric_limits::min()); @@ -14772,15 +14073,9 @@ class fuzz_div0_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "fuzz_div0_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { std::vector T = std::vector(6, std::numeric_limits::min()); @@ -14820,25 +14115,13 @@ class fuzz_div0_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "fuzz_div0_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { if (stan::math::logical_negation( (stan::math::primitive_value(emit_transformed_parameters__) || @@ -14862,11 +14145,7 @@ class fuzz_div0_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } template * = nullptr> inline void @@ -14875,11 +14154,7 @@ class fuzz_div0_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } inline void get_param_names(std::vector& names__, const bool @@ -15013,6 +14288,9 @@ stan::math::profile_map& get_stan_profile_data() { return fuzz_div0_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif Warning in 'fuzz-div0.stan', line 2, column 34: Found int division: 0 / 0 Values will be rounded towards zero. If rounding is not desired you can @@ -15030,6 +14308,12 @@ Warning in 'fuzz-div0.stan', line 2, column 41: Found int division: $ ../../../../../install/default/bin/stanc --print-cpp --O0 initialize-SoA.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace initialize_SoA_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -15052,19 +14336,11 @@ class initialize_SoA_model final : public model_base_crtp random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "initialize_SoA_model_namespace::initialize_SoA_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; num_params_r__ = 3 + (3 * 4); } inline std::string model_name() const final { @@ -15088,15 +14364,9 @@ class initialize_SoA_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "initialize_SoA_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix y = Eigen::Matrix::Constant(3, DUMMY_VAR__); @@ -15145,15 +14415,9 @@ class initialize_SoA_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "initialize_SoA_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix y = Eigen::Matrix::Constant(3, DUMMY_VAR__); @@ -15203,25 +14467,13 @@ class initialize_SoA_model final : public model_base_crtp stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "initialize_SoA_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix y = Eigen::Matrix::Constant(3, @@ -15274,11 +14526,7 @@ class initialize_SoA_model final : public model_base_crtp stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { Eigen::Matrix y = Eigen::Matrix::Constant(3, DUMMY_VAR__); @@ -15311,11 +14559,7 @@ class initialize_SoA_model final : public model_base_crtp using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "y", "double", @@ -15535,10 +14779,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return initialize_SoA_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --print-cpp --O0 inline-functions-varmat.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace inline_functions_varmat_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -15576,15 +14829,9 @@ Eigen::Matrix>,-1,1> single_ret_fun(const T0__& A_arg__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& A = stan::math::to_ref(A_arg__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 5; return A; @@ -15600,15 +14847,9 @@ Eigen::Matrix>,-1,1> multi_ret_fun(const T0__& A_arg__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& A = stan::math::to_ref(A_arg__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { Eigen::Matrix B = Eigen::Matrix::Constant(5, DUMMY_VAR__); @@ -15634,19 +14875,11 @@ class inline_functions_varmat_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; num_params_r__ = 5 + 5; } inline std::string model_name() const final { @@ -15670,15 +14903,9 @@ class inline_functions_varmat_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "inline_functions_varmat_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix p_single_ret_vec = Eigen::Matrix::Constant(5, DUMMY_VAR__); @@ -15722,15 +14949,9 @@ class inline_functions_varmat_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "inline_functions_varmat_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix p_single_ret_vec = Eigen::Matrix::Constant(5, DUMMY_VAR__); @@ -15775,25 +14996,13 @@ class inline_functions_varmat_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "inline_functions_varmat_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix p_single_ret_vec = Eigen::Matrix::Constant(5, @@ -15849,11 +15058,7 @@ class inline_functions_varmat_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { Eigen::Matrix p_single_ret_vec = Eigen::Matrix::Constant(5, DUMMY_VAR__); @@ -15880,11 +15085,7 @@ class inline_functions_varmat_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "p_single_ret_vec", @@ -16106,10 +15307,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return inline_functions_varmat_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --print-cpp --O0 inline-tdata.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace inline_tdata_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -16136,14 +15346,8 @@ Eigen::Matrix foo(const T0__& N, const T1__& M, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 8; return stan::math::promote_scalar( @@ -16164,19 +15368,11 @@ class inline_tdata_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "inline_tdata_model_namespace::inline_tdata_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__ = std::numeric_limits::min(); pos__ = 1; @@ -16225,15 +15421,9 @@ class inline_tdata_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "inline_tdata_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ alpha = DUMMY_VAR__; current_statement__ = 1; @@ -16263,15 +15453,9 @@ class inline_tdata_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "inline_tdata_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ alpha = DUMMY_VAR__; current_statement__ = 1; @@ -16302,25 +15486,13 @@ class inline_tdata_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "inline_tdata_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { double alpha = std::numeric_limits::quiet_NaN(); current_statement__ = 1; @@ -16348,11 +15520,7 @@ class inline_tdata_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { local_scalar_t__ alpha = DUMMY_VAR__; current_statement__ = 1; @@ -16369,11 +15537,7 @@ class inline_tdata_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "alpha", "double", @@ -16519,10 +15683,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return inline_tdata_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --print-cpp --O0 inliner-same-names.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace inliner_same_names_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -16553,15 +15726,9 @@ Eigen::Matrix>,-1,1> foo(const T0__& oR_arg__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& oR = stan::math::to_ref(oR_arg__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int ot = std::numeric_limits::min(); current_statement__ = 7; @@ -16587,19 +15754,11 @@ class inliner_same_names_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 4; context__.validate_dims("data initialization", "N", "int", @@ -16637,15 +15796,9 @@ class inliner_same_names_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "inliner_same_names_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix R = Eigen::Matrix::Constant(N, DUMMY_VAR__); @@ -16673,15 +15826,9 @@ class inliner_same_names_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "inliner_same_names_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix R = Eigen::Matrix::Constant(N, DUMMY_VAR__); @@ -16710,25 +15857,13 @@ class inliner_same_names_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "inliner_same_names_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix R = Eigen::Matrix::Constant(N, @@ -16764,11 +15899,7 @@ class inliner_same_names_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } template * = nullptr> inline void @@ -16777,11 +15908,7 @@ class inliner_same_names_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } inline void get_param_names(std::vector& names__, const bool @@ -16942,10 +16069,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return inliner_same_names_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --print-cpp --O0 inlining-fail2.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace inlining_fail2_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -17161,14 +16297,8 @@ template ::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 88; for (int k = 1; k <= stan::math::size(y_i); ++k) { @@ -17191,14 +16321,8 @@ template ::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 95; for (int k_rev = 0; k_rev <= (stan::math::size(y_i) - 1); ++k_rev) { @@ -17230,16 +16354,10 @@ prob_uncaptured(const T0__& p_arg__, const T1__& phi_arg__, std::ostream* using local_scalar_t__ = stan::promote_args_t, stan::base_type_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& p = stan::math::to_ref(p_arg__); const auto& phi = stan::math::to_ref(phi_arg__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int n_ind = std::numeric_limits::min(); current_statement__ = 98; @@ -17318,15 +16436,11 @@ jolly_seber_lp(const T0__& y, const T1__& first, const T2__& last, stan::base_type_t, stan::base_type_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& p = stan::math::to_ref(p_arg__); const auto& phi = stan::math::to_ref(phi_arg__); const auto& gamma = stan::math::to_ref(gamma_arg__); const auto& chi = stan::math::to_ref(chi_arg__); local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int n_ind = std::numeric_limits::min(); current_statement__ = 113; @@ -17544,15 +16658,9 @@ Eigen::Matrix>,-1,1> seq_cprob(const T0__& gamma_arg__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& gamma = stan::math::to_ref(gamma_arg__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int N = std::numeric_limits::min(); current_statement__ = 148; @@ -17598,19 +16706,11 @@ class inlining_fail2_model final : public model_base_crtp random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "inlining_fail2_model_namespace::inlining_fail2_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__ = std::numeric_limits::min(); pos__ = 1; @@ -17755,15 +16855,9 @@ class inlining_fail2_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "inlining_fail2_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ mean_phi = DUMMY_VAR__; current_statement__ = 1; @@ -17856,15 +16950,9 @@ class inlining_fail2_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "inlining_fail2_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ mean_phi = DUMMY_VAR__; current_statement__ = 1; @@ -17958,25 +17046,13 @@ class inlining_fail2_model final : public model_base_crtp stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "inlining_fail2_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { double mean_phi = std::numeric_limits::quiet_NaN(); current_statement__ = 1; @@ -18213,11 +17289,7 @@ class inlining_fail2_model final : public model_base_crtp stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { local_scalar_t__ mean_phi = DUMMY_VAR__; current_statement__ = 1; @@ -18258,11 +17330,7 @@ class inlining_fail2_model final : public model_base_crtp using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "mean_phi", @@ -18605,10 +17673,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return inlining_fail2_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --print-cpp --O0 lcm-experiment.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace lcm_experiment_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -18634,19 +17711,11 @@ class lcm_experiment_model final : public model_base_crtp random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "lcm_experiment_model_namespace::lcm_experiment_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("data initialization", "j", "int", @@ -18698,15 +17767,9 @@ class lcm_experiment_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "lcm_experiment_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; lp_accum__.add(lp__); return lp_accum__.sum(); } @@ -18724,15 +17787,9 @@ class lcm_experiment_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "lcm_experiment_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; lp_accum__.add(lp__); return lp_accum__.sum(); } @@ -18751,25 +17808,13 @@ class lcm_experiment_model final : public model_base_crtp stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "lcm_experiment_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { if (stan::math::logical_negation( (stan::math::primitive_value(emit_transformed_parameters__) || @@ -18793,11 +17838,7 @@ class lcm_experiment_model final : public model_base_crtp stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } template * = nullptr> inline void @@ -18806,11 +17847,7 @@ class lcm_experiment_model final : public model_base_crtp using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } inline void get_param_names(std::vector& names__, const bool @@ -18943,10 +17980,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return lcm_experiment_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --print-cpp --O0 lcm-experiment2.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace lcm_experiment2_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -18970,19 +18016,11 @@ class lcm_experiment2_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; num_params_r__ = 1; } inline std::string model_name() const final { @@ -19006,15 +18044,9 @@ class lcm_experiment2_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "lcm_experiment2_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ x = DUMMY_VAR__; current_statement__ = 1; @@ -19056,15 +18088,9 @@ class lcm_experiment2_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "lcm_experiment2_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ x = DUMMY_VAR__; current_statement__ = 1; @@ -19107,25 +18133,13 @@ class lcm_experiment2_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "lcm_experiment2_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { double x = std::numeric_limits::quiet_NaN(); current_statement__ = 1; @@ -19153,11 +18167,7 @@ class lcm_experiment2_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { local_scalar_t__ x = DUMMY_VAR__; current_statement__ = 1; @@ -19174,11 +18184,7 @@ class lcm_experiment2_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "x", "double", @@ -19324,10 +18330,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return lcm_experiment2_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --print-cpp --O0 lcm-fails.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace lcm_fails_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -19350,19 +18365,11 @@ class lcm_fails_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "lcm_fails_model_namespace::lcm_fails_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 3; context__.validate_dims("data initialization", "J", "int", @@ -19408,15 +18415,9 @@ class lcm_fails_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "lcm_fails_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { std::vector theta = std::vector(J, DUMMY_VAR__); @@ -19446,15 +18447,9 @@ class lcm_fails_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "lcm_fails_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { std::vector theta = std::vector(J, DUMMY_VAR__); @@ -19485,25 +18480,13 @@ class lcm_fails_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "lcm_fails_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { std::vector theta = std::vector(J, std::numeric_limits::quiet_NaN()); @@ -19532,11 +18515,7 @@ class lcm_fails_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { std::vector theta = std::vector(J, DUMMY_VAR__); @@ -19555,11 +18534,7 @@ class lcm_fails_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "theta", "double", @@ -19713,10 +18688,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return lcm_fails_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --print-cpp --O0 lcm-fails2.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace lcm_fails2_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -19818,14 +18802,8 @@ template ::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 48; for (int k = 1; k <= stan::math::size(y_i); ++k) { @@ -19848,14 +18826,8 @@ template ::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 55; for (int k_rev = 0; k_rev <= (stan::math::size(y_i) - 1); ++k_rev) { @@ -19888,16 +18860,10 @@ prob_uncaptured(const T0__& nind, const T1__& n_occasions, const T2__& using local_scalar_t__ = stan::promote_args_t, stan::base_type_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& p = stan::math::to_ref(p_arg__); const auto& phi = stan::math::to_ref(phi_arg__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 58; stan::math::validate_non_negative_index("chi", "nind", nind); @@ -19952,19 +18918,11 @@ class lcm_fails2_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "lcm_fails2_model_namespace::lcm_fails2_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__ = std::numeric_limits::min(); pos__ = 1; @@ -20090,15 +19048,9 @@ class lcm_fails2_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "lcm_fails2_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ mean_phi = DUMMY_VAR__; current_statement__ = 1; @@ -20214,15 +19166,9 @@ class lcm_fails2_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "lcm_fails2_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ mean_phi = DUMMY_VAR__; current_statement__ = 1; @@ -20339,25 +19285,13 @@ class lcm_fails2_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "lcm_fails2_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { double mean_phi = std::numeric_limits::quiet_NaN(); current_statement__ = 1; @@ -20446,11 +19380,7 @@ class lcm_fails2_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { local_scalar_t__ mean_phi = DUMMY_VAR__; current_statement__ = 1; @@ -20471,11 +19401,7 @@ class lcm_fails2_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "mean_phi", @@ -20685,10 +19611,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return lcm_fails2_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --print-cpp --O0 lupdf-inlining.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace lupdf_inlining_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -20735,11 +19670,7 @@ stan::promote_args_t foo_lpdf(const T0__& x, const T1__& mu, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 8; return stan::math::normal_lpdf(x, mu, 1); @@ -20756,11 +19687,7 @@ stan::promote_args_t bar_lpmf(const T0__& n, const T1__& mu, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 10; return stan::math::poisson_lpmf(n, mu); @@ -20775,11 +19702,7 @@ template baz_lpdf(const T0__& x, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 12; return foo_lpdf(x, 0.5, pstream__); @@ -20796,19 +19719,11 @@ class lupdf_inlining_model final : public model_base_crtp random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "lupdf_inlining_model_namespace::lupdf_inlining_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 7; context__.validate_dims("data initialization", "n", "int", @@ -20842,15 +19757,9 @@ class lupdf_inlining_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "lupdf_inlining_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ mu = DUMMY_VAR__; current_statement__ = 1; @@ -20884,15 +19793,9 @@ class lupdf_inlining_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "lupdf_inlining_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ mu = DUMMY_VAR__; current_statement__ = 1; @@ -20927,25 +19830,13 @@ class lupdf_inlining_model final : public model_base_crtp stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "lupdf_inlining_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { double mu = std::numeric_limits::quiet_NaN(); current_statement__ = 1; @@ -20987,11 +19878,7 @@ class lupdf_inlining_model final : public model_base_crtp stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { local_scalar_t__ mu = DUMMY_VAR__; current_statement__ = 1; @@ -21008,11 +19895,7 @@ class lupdf_inlining_model final : public model_base_crtp using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "mu", "double", @@ -21185,10 +20068,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return lupdf_inlining_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --print-cpp --O0 off-dce.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace off_dce_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -21264,19 +20156,11 @@ class off_dce_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "off_dce_model_namespace::off_dce_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__ = std::numeric_limits::min(); pos__ = 1; @@ -21407,15 +20291,9 @@ class off_dce_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "off_dce_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ alpha_occ = DUMMY_VAR__; current_statement__ = 1; @@ -21492,15 +20370,9 @@ class off_dce_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "off_dce_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ alpha_occ = DUMMY_VAR__; current_statement__ = 1; @@ -21578,25 +20450,13 @@ class off_dce_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "off_dce_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { double alpha_occ = std::numeric_limits::quiet_NaN(); current_statement__ = 1; @@ -21710,11 +20570,7 @@ class off_dce_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { local_scalar_t__ alpha_occ = DUMMY_VAR__; current_statement__ = 1; @@ -21743,11 +20599,7 @@ class off_dce_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "alpha_occ", @@ -21991,10 +20843,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return off_dce_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --print-cpp --O0 off-small.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace off_small_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -22054,19 +20915,11 @@ class off_small_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "off_small_model_namespace::off_small_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__ = std::numeric_limits::min(); pos__ = 1; @@ -22193,15 +21046,9 @@ class off_small_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "off_small_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ beta = DUMMY_VAR__; current_statement__ = 1; @@ -22298,15 +21145,9 @@ class off_small_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "off_small_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ beta = DUMMY_VAR__; current_statement__ = 1; @@ -22404,25 +21245,13 @@ class off_small_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "off_small_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { double beta = std::numeric_limits::quiet_NaN(); current_statement__ = 1; @@ -22525,11 +21354,7 @@ class off_small_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { local_scalar_t__ beta = DUMMY_VAR__; current_statement__ = 1; @@ -22580,11 +21405,7 @@ class off_small_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "beta", "double", @@ -22872,10 +21693,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return off_small_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --print-cpp --O0 optimizations.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace optimizations_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -23051,11 +21881,7 @@ nrfun_lp(const T0__& x, const T1__& y, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 136; if (stan::math::logical_gt(x, 342)) { @@ -23073,14 +21899,8 @@ template >*> int rfun(const T0__& y, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 140; if (stan::math::logical_gt(y, 2)) { @@ -23098,11 +21918,7 @@ template int rfun_lp(T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 143; lp_accum__.add(2); @@ -23121,19 +21937,11 @@ class optimizations_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "optimizations_model_namespace::optimizations_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; num_params_r__ = 1 + 1 + (3 * 2) + 2 + (2 + ((2 * (2 - 1)) / 2)); } inline std::string model_name() const final { @@ -23157,15 +21965,9 @@ class optimizations_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "optimizations_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ theta = DUMMY_VAR__; current_statement__ = 1; @@ -23453,15 +22255,9 @@ class optimizations_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "optimizations_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ theta = DUMMY_VAR__; current_statement__ = 1; @@ -23750,25 +22546,13 @@ class optimizations_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "optimizations_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { double theta = std::numeric_limits::quiet_NaN(); current_statement__ = 1; @@ -23820,11 +22604,7 @@ class optimizations_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { local_scalar_t__ theta = DUMMY_VAR__; current_statement__ = 1; @@ -23866,11 +22646,7 @@ class optimizations_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "theta", "double", @@ -24122,10 +22898,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return optimizations_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --print-cpp --O0 overloaded-fn.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace overloaded_fn_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -24151,14 +22936,8 @@ template dumb(const T0__& x, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 2; return (x + 0.5); @@ -24171,14 +22950,8 @@ template >*> double dumb(const T0__& x, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 4; return (x - 0.5); @@ -24195,19 +22968,11 @@ class overloaded_fn_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "overloaded_fn_model_namespace::overloaded_fn_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; num_params_r__ = 0U; } inline std::string model_name() const final { @@ -24231,15 +22996,9 @@ class overloaded_fn_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "overloaded_fn_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { current_statement__ = 1; lp_accum__.add(dumb(1.0, pstream__)); @@ -24263,15 +23022,9 @@ class overloaded_fn_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "overloaded_fn_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { current_statement__ = 1; lp_accum__.add(dumb(1.0, pstream__)); @@ -24296,25 +23049,13 @@ class overloaded_fn_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "overloaded_fn_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { if (stan::math::logical_negation( (stan::math::primitive_value(emit_transformed_parameters__) || @@ -24338,11 +23079,7 @@ class overloaded_fn_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } template * = nullptr> inline void @@ -24351,11 +23088,7 @@ class overloaded_fn_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } inline void get_param_names(std::vector& names__, const bool @@ -24488,10 +23221,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return overloaded_fn_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --print-cpp --O0 overloaded-fn2.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace overloaded_fn2_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -24525,15 +23267,9 @@ stan::promote_args_t> foo(const T0__& x_arg__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& x = stan::math::to_ref(x_arg__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 2; return stan::math::sum(x); @@ -24546,11 +23282,7 @@ template void bar_lp(T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 4; lp_accum__.add(stan::model::rvalue(foo(1.0, pstream__), "foo(1.0)", @@ -24567,14 +23299,8 @@ Eigen::Matrix,-1,1> foo(const T0__& x, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 6; return (Eigen::Matrix(1) << x).finished(); @@ -24591,19 +23317,11 @@ class overloaded_fn2_model final : public model_base_crtp random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "overloaded_fn2_model_namespace::overloaded_fn2_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; num_params_r__ = 0U; } inline std::string model_name() const final { @@ -24627,15 +23345,9 @@ class overloaded_fn2_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "overloaded_fn2_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { current_statement__ = 1; bar_lp(lp__, lp_accum__, pstream__); @@ -24659,15 +23371,9 @@ class overloaded_fn2_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "overloaded_fn2_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { current_statement__ = 1; bar_lp(lp__, lp_accum__, pstream__); @@ -24692,25 +23398,13 @@ class overloaded_fn2_model final : public model_base_crtp stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "overloaded_fn2_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { if (stan::math::logical_negation( (stan::math::primitive_value(emit_transformed_parameters__) || @@ -24734,11 +23428,7 @@ class overloaded_fn2_model final : public model_base_crtp stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } template * = nullptr> inline void @@ -24747,11 +23437,7 @@ class overloaded_fn2_model final : public model_base_crtp using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } inline void get_param_names(std::vector& names__, const bool @@ -24884,10 +23570,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return overloaded_fn2_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --print-cpp --O0 partial-eval-tuple.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace partial_eval_tuple_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -24907,19 +23602,11 @@ class partial_eval_tuple_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; num_params_r__ = 0U; } inline std::string model_name() const final { @@ -24943,15 +23630,9 @@ class partial_eval_tuple_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "partial_eval_tuple_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { std::tuple> x = std::tuple>{DUMMY_VAR__, @@ -24985,15 +23666,9 @@ class partial_eval_tuple_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "partial_eval_tuple_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { std::tuple> x = std::tuple>{DUMMY_VAR__, @@ -25028,25 +23703,13 @@ class partial_eval_tuple_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "partial_eval_tuple_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { std::tuple> x = std::tuple>{std::numeric_limits::quiet_NaN( @@ -25081,11 +23744,7 @@ class partial_eval_tuple_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } template * = nullptr> inline void @@ -25094,11 +23753,7 @@ class partial_eval_tuple_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } inline void get_param_names(std::vector& names__, const bool @@ -25264,10 +23919,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return partial_eval_tuple_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --print-cpp --O0 partial-eval.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace partial_eval_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -25319,19 +23983,11 @@ class partial_eval_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "partial_eval_model_namespace::partial_eval_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__ = std::numeric_limits::min(); pos__ = 1; @@ -25457,15 +24113,9 @@ class partial_eval_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "partial_eval_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix a = Eigen::Matrix::Constant(n_pair, DUMMY_VAR__); @@ -25546,15 +24196,9 @@ class partial_eval_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "partial_eval_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix a = Eigen::Matrix::Constant(n_pair, DUMMY_VAR__); @@ -25636,25 +24280,13 @@ class partial_eval_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "partial_eval_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix a = Eigen::Matrix::Constant(n_pair, @@ -25724,11 +24356,7 @@ class partial_eval_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { Eigen::Matrix a = Eigen::Matrix::Constant(n_pair, DUMMY_VAR__); @@ -25767,11 +24395,7 @@ class partial_eval_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "a", "double", @@ -26012,10 +24636,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return partial_eval_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --print-cpp --O0 partial_eval_multiply.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace partial_eval_multiply_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -26046,19 +24679,11 @@ class partial_eval_multiply_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__ = std::numeric_limits::min(); pos__ = 1; @@ -26142,15 +24767,9 @@ class partial_eval_multiply_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "partial_eval_multiply_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix m2 = Eigen::Matrix::Constant(10, 10, DUMMY_VAR__); @@ -26210,15 +24829,9 @@ class partial_eval_multiply_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "partial_eval_multiply_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix m2 = Eigen::Matrix::Constant(10, 10, DUMMY_VAR__); @@ -26279,25 +24892,13 @@ class partial_eval_multiply_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "partial_eval_multiply_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix m2 = Eigen::Matrix::Constant(10, 10, @@ -26333,11 +24934,7 @@ class partial_eval_multiply_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { Eigen::Matrix m2 = Eigen::Matrix::Constant(10, 10, DUMMY_VAR__); @@ -26364,11 +24961,7 @@ class partial_eval_multiply_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "m2", "double", @@ -26576,10 +25169,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return partial_eval_multiply_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --print-cpp --O0 partial_eval_zeros.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace partial_eval_zeros_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -26602,19 +25204,11 @@ class partial_eval_zeros_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__ = std::numeric_limits::min(); pos__ = 1; @@ -26667,15 +25261,9 @@ class partial_eval_zeros_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "partial_eval_zeros_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; lp_accum__.add(lp__); return lp_accum__.sum(); } @@ -26693,15 +25281,9 @@ class partial_eval_zeros_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "partial_eval_zeros_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; lp_accum__.add(lp__); return lp_accum__.sum(); } @@ -26720,25 +25302,13 @@ class partial_eval_zeros_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "partial_eval_zeros_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { if (stan::math::logical_negation( (stan::math::primitive_value(emit_transformed_parameters__) || @@ -26762,11 +25332,7 @@ class partial_eval_zeros_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } template * = nullptr> inline void @@ -26775,11 +25341,7 @@ class partial_eval_zeros_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } inline void get_param_names(std::vector& names__, const bool @@ -26912,10 +25474,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return partial_eval_zeros_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --print-cpp --O0 stalled1-failure.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace stalled1_failure_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -26973,19 +25544,11 @@ class stalled1_failure_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__ = std::numeric_limits::min(); pos__ = 1; @@ -27099,15 +25662,9 @@ class stalled1_failure_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "stalled1_failure_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ alpha0 = DUMMY_VAR__; current_statement__ = 1; @@ -27188,15 +25745,9 @@ class stalled1_failure_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "stalled1_failure_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ alpha0 = DUMMY_VAR__; current_statement__ = 1; @@ -27278,25 +25829,13 @@ class stalled1_failure_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "stalled1_failure_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { double alpha0 = std::numeric_limits::quiet_NaN(); current_statement__ = 1; @@ -27360,11 +25899,7 @@ class stalled1_failure_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { local_scalar_t__ alpha0 = DUMMY_VAR__; current_statement__ = 1; @@ -27410,11 +25945,7 @@ class stalled1_failure_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "alpha0", "double", @@ -27648,10 +26179,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return stalled1_failure_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --print-cpp --O0 unenforce-initialize-should-fail.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace unenforce_initialize_should_fail_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -27677,19 +26217,11 @@ class unenforce_initialize_should_fail_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__ = std::numeric_limits::min(); pos__ = 1; @@ -27727,15 +26259,9 @@ class unenforce_initialize_should_fail_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "unenforce_initialize_should_fail_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ param = DUMMY_VAR__; current_statement__ = 1; @@ -27780,15 +26306,9 @@ class unenforce_initialize_should_fail_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "unenforce_initialize_should_fail_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ param = DUMMY_VAR__; current_statement__ = 1; @@ -27834,25 +26354,13 @@ class unenforce_initialize_should_fail_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "unenforce_initialize_should_fail_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { double param = std::numeric_limits::quiet_NaN(); current_statement__ = 1; @@ -27905,11 +26413,7 @@ class unenforce_initialize_should_fail_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { local_scalar_t__ param = DUMMY_VAR__; current_statement__ = 1; @@ -27926,11 +26430,7 @@ class unenforce_initialize_should_fail_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "param", "double", @@ -28100,10 +26600,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return unenforce_initialize_should_fail_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --print-cpp --O0 unenforce-initialize.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace unenforce_initialize_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -28132,19 +26641,11 @@ class unenforce_initialize_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; num_params_r__ = 1; } inline std::string model_name() const final { @@ -28168,15 +26669,9 @@ class unenforce_initialize_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "unenforce_initialize_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ y = DUMMY_VAR__; current_statement__ = 1; @@ -28223,15 +26718,9 @@ class unenforce_initialize_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "unenforce_initialize_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ y = DUMMY_VAR__; current_statement__ = 1; @@ -28279,25 +26768,13 @@ class unenforce_initialize_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "unenforce_initialize_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { double y = std::numeric_limits::quiet_NaN(); current_statement__ = 1; @@ -28355,11 +26832,7 @@ class unenforce_initialize_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { local_scalar_t__ y = DUMMY_VAR__; current_statement__ = 1; @@ -28376,11 +26849,7 @@ class unenforce_initialize_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "y", "double", @@ -28556,11 +27025,20 @@ stan::math::profile_map& get_stan_profile_data() { return unenforce_initialize_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif Warning in 'unenforce-initialize.stan', line 8, column 2: Assignment of variable to itself during declaration. This is almost certainly a bug. $ ../../../../../install/default/bin/stanc --print-cpp --O0 unroll-limit.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace unroll_limit_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -28592,19 +27070,11 @@ class unroll_limit_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "unroll_limit_model_namespace::unroll_limit_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; num_params_r__ = 0U; } inline std::string model_name() const final { @@ -28628,15 +27098,9 @@ class unroll_limit_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "unroll_limit_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; lp_accum__.add(lp__); return lp_accum__.sum(); } @@ -28654,15 +27118,9 @@ class unroll_limit_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "unroll_limit_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; lp_accum__.add(lp__); return lp_accum__.sum(); } @@ -28681,25 +27139,13 @@ class unroll_limit_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "unroll_limit_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { if (stan::math::logical_negation( (stan::math::primitive_value(emit_transformed_parameters__) || @@ -28750,11 +27196,7 @@ class unroll_limit_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } template * = nullptr> inline void @@ -28763,11 +27205,7 @@ class unroll_limit_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } inline void get_param_names(std::vector& names__, const bool @@ -28913,3 +27351,6 @@ stan::math::profile_map& get_stan_profile_data() { return unroll_limit_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif diff --git a/test/integration/good/compiler-optimizations/cppO1.expected b/test/integration/good/compiler-optimizations/cppO1.expected index 204ff01a4..69af2ea0a 100644 --- a/test/integration/good/compiler-optimizations/cppO1.expected +++ b/test/integration/good/compiler-optimizations/cppO1.expected @@ -1,6 +1,12 @@ $ ../../../../../install/default/bin/stanc --O1 --print-cpp ad-level-deep-dependence.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace ad_level_deep_dependence_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -28,19 +34,11 @@ class ad_level_deep_dependence_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__; pos__ = 1; @@ -91,15 +89,9 @@ class ad_level_deep_dependence_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "ad_level_deep_dependence_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix X_p; current_statement__ = 1; @@ -153,15 +145,9 @@ class ad_level_deep_dependence_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "ad_level_deep_dependence_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { stan::math::var_value> X_p; current_statement__ = 1; @@ -217,25 +203,13 @@ class ad_level_deep_dependence_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "ad_level_deep_dependence_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix X_p; current_statement__ = 1; @@ -315,11 +289,7 @@ class ad_level_deep_dependence_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { Eigen::Matrix X_p; current_statement__ = 1; @@ -338,11 +308,7 @@ class ad_level_deep_dependence_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "X_p", "double", @@ -629,10 +595,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return ad_level_deep_dependence_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --O1 --print-cpp ad-level-failing.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace ad_level_failing_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -765,14 +740,8 @@ simple_SIR(const T0__& t, const T1__& y, const T2__& theta, const T3__& x_r, stan::base_type_t, stan::base_type_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { std::vector dydt = std::vector(4, DUMMY_VAR__); @@ -829,19 +798,11 @@ class ad_level_failing_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 17; context__.validate_dims("data initialization", "N_t", "int", @@ -924,15 +885,9 @@ class ad_level_failing_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "ad_level_failing_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ beta; current_statement__ = 1; @@ -1024,15 +979,9 @@ class ad_level_failing_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "ad_level_failing_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ beta; current_statement__ = 1; @@ -1125,25 +1074,13 @@ class ad_level_failing_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "ad_level_failing_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { double beta; current_statement__ = 1; @@ -1212,11 +1149,7 @@ class ad_level_failing_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { local_scalar_t__ beta; current_statement__ = 1; @@ -1245,11 +1178,7 @@ class ad_level_failing_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "beta", "double", @@ -1449,6 +1378,9 @@ stan::math::profile_map& get_stan_profile_data() { return ad_level_failing_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif Warning in 'ad-level-failing.stan', line 46, column 8: integrate_ode_rk45 is deprecated and will be removed in Stan 3.0. Use ode_rk45 instead. The new interface is slightly different, see: @@ -1456,6 +1388,12 @@ Warning in 'ad-level-failing.stan', line 46, column 8: integrate_ode_rk45 is $ ../../../../../install/default/bin/stanc --O1 --print-cpp ad-levels-deep.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace ad_levels_deep_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -1477,19 +1415,11 @@ class ad_levels_deep_model final : public model_base_crtp random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "ad_levels_deep_model_namespace::ad_levels_deep_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__; pos__ = 1; @@ -1540,15 +1470,9 @@ class ad_levels_deep_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "ad_levels_deep_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix X_p; current_statement__ = 1; @@ -1583,15 +1507,9 @@ class ad_levels_deep_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "ad_levels_deep_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { stan::math::var_value> X_p; current_statement__ = 1; @@ -1628,25 +1546,13 @@ class ad_levels_deep_model final : public model_base_crtp stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "ad_levels_deep_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix X_p; current_statement__ = 1; @@ -1692,11 +1598,7 @@ class ad_levels_deep_model final : public model_base_crtp stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { Eigen::Matrix X_p; current_statement__ = 1; @@ -1715,11 +1617,7 @@ class ad_levels_deep_model final : public model_base_crtp using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "X_p", "double", @@ -1933,10 +1831,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return ad_levels_deep_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --O1 --print-cpp copy-prop-profile.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace copy_prop_profile_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -1970,19 +1877,11 @@ class copy_prop_profile_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 16; context__.validate_dims("data initialization", "N", "int", @@ -2022,15 +1921,9 @@ class copy_prop_profile_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "copy_prop_profile_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix X; current_statement__ = 1; @@ -2092,15 +1985,9 @@ class copy_prop_profile_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "copy_prop_profile_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix X; current_statement__ = 1; @@ -2163,25 +2050,13 @@ class copy_prop_profile_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "copy_prop_profile_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix X; current_statement__ = 1; @@ -2209,11 +2084,7 @@ class copy_prop_profile_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { Eigen::Matrix X; current_statement__ = 1; @@ -2232,11 +2103,7 @@ class copy_prop_profile_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "X", "double", @@ -2408,10 +2275,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return copy_prop_profile_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --O1 --print-cpp copy_fail.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace copy_fail_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -2517,14 +2393,8 @@ template ::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 64; for (int k = 1; k <= stan::math::size(y_i); ++k) { @@ -2547,14 +2417,8 @@ template ::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 71; for (int k_rev = 0; k_rev <= (stan::math::size(y_i) - 1); ++k_rev) { @@ -2587,16 +2451,10 @@ prob_uncaptured(const T0__& nind, const T1__& n_occasions, const T2__& using local_scalar_t__ = stan::promote_args_t, stan::base_type_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& p = stan::math::to_ref(p_arg__); const auto& phi = stan::math::to_ref(phi_arg__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 16; stan::math::validate_non_negative_index("chi", "nind", nind); @@ -2654,19 +2512,11 @@ class copy_fail_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "copy_fail_model_namespace::copy_fail_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__; pos__ = 1; @@ -2832,15 +2682,9 @@ class copy_fail_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "copy_fail_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ mean_p; current_statement__ = 1; @@ -3020,15 +2864,9 @@ class copy_fail_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "copy_fail_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ mean_p; current_statement__ = 1; @@ -3209,25 +3047,13 @@ class copy_fail_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "copy_fail_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { double mean_p; current_statement__ = 1; @@ -3378,11 +3204,7 @@ class copy_fail_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { local_scalar_t__ mean_p; current_statement__ = 1; @@ -3405,11 +3227,7 @@ class copy_fail_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "mean_p", "double", @@ -3637,10 +3455,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return copy_fail_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --O1 --print-cpp dce-fail.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace dce_fail_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -3734,19 +3561,11 @@ class dce_fail_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "dce_fail_model_namespace::dce_fail_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__; pos__ = 1; @@ -3934,15 +3753,9 @@ class dce_fail_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "dce_fail_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ sigma; current_statement__ = 1; @@ -4118,15 +3931,9 @@ class dce_fail_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "dce_fail_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ sigma; current_statement__ = 1; @@ -4303,25 +4110,13 @@ class dce_fail_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "dce_fail_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { double sigma; current_statement__ = 1; @@ -4418,11 +4213,7 @@ class dce_fail_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { local_scalar_t__ sigma; current_statement__ = 1; @@ -4509,11 +4300,7 @@ class dce_fail_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "sigma", "double", @@ -4904,10 +4691,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return dce_fail_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --O1 --print-cpp expr-prop-experiment.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace expr_prop_experiment_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -4936,19 +4732,11 @@ class expr_prop_experiment_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("data initialization", "j", "int", @@ -5000,15 +4788,9 @@ class expr_prop_experiment_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "expr_prop_experiment_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; lp_accum__.add(lp__); return lp_accum__.sum(); } @@ -5026,15 +4808,9 @@ class expr_prop_experiment_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "expr_prop_experiment_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; lp_accum__.add(lp__); return lp_accum__.sum(); } @@ -5053,25 +4829,13 @@ class expr_prop_experiment_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "expr_prop_experiment_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { if (stan::math::logical_negation( (stan::math::primitive_value(emit_transformed_parameters__) || @@ -5095,11 +4859,7 @@ class expr_prop_experiment_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } template * = nullptr> inline void @@ -5108,11 +4868,7 @@ class expr_prop_experiment_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } inline void get_param_names(std::vector& names__, const bool @@ -5245,10 +5001,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return expr_prop_experiment_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --O1 --print-cpp expr-prop-experiment2.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace expr_prop_experiment2_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -5274,19 +5039,11 @@ class expr_prop_experiment2_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("data initialization", "j", "int", @@ -5337,15 +5094,9 @@ class expr_prop_experiment2_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "expr_prop_experiment2_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; lp_accum__.add(lp__); return lp_accum__.sum(); } @@ -5363,15 +5114,9 @@ class expr_prop_experiment2_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "expr_prop_experiment2_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; lp_accum__.add(lp__); return lp_accum__.sum(); } @@ -5390,25 +5135,13 @@ class expr_prop_experiment2_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "expr_prop_experiment2_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { if (stan::math::logical_negation( (stan::math::primitive_value(emit_transformed_parameters__) || @@ -5432,11 +5165,7 @@ class expr_prop_experiment2_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } template * = nullptr> inline void @@ -5445,11 +5174,7 @@ class expr_prop_experiment2_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } inline void get_param_names(std::vector& names__, const bool @@ -5582,10 +5307,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return expr_prop_experiment2_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --O1 --print-cpp expr-prop-fail.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace expr_prop_fail_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -5614,19 +5348,11 @@ class expr_prop_fail_model final : public model_base_crtp random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "expr_prop_fail_model_namespace::expr_prop_fail_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__; pos__ = 1; @@ -5683,15 +5409,9 @@ class expr_prop_fail_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "expr_prop_fail_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix mu; current_statement__ = 1; @@ -5752,15 +5472,9 @@ class expr_prop_fail_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "expr_prop_fail_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix mu; current_statement__ = 1; @@ -5822,25 +5536,13 @@ class expr_prop_fail_model final : public model_base_crtp stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "expr_prop_fail_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix mu; current_statement__ = 1; @@ -5879,11 +5581,7 @@ class expr_prop_fail_model final : public model_base_crtp stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { Eigen::Matrix mu; current_statement__ = 1; @@ -5911,11 +5609,7 @@ class expr_prop_fail_model final : public model_base_crtp using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "mu", "double", @@ -6107,10 +5801,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return expr_prop_fail_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --O1 --print-cpp expr-prop-fail2.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace expr_prop_fail2_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -6139,19 +5842,11 @@ class expr_prop_fail2_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 6; context__.validate_dims("data initialization", "J", "int", @@ -6208,15 +5903,9 @@ class expr_prop_fail2_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "expr_prop_fail2_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ mu; current_statement__ = 1; @@ -6254,15 +5943,9 @@ class expr_prop_fail2_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "expr_prop_fail2_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ mu; current_statement__ = 1; @@ -6301,25 +5984,13 @@ class expr_prop_fail2_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "expr_prop_fail2_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { double mu; current_statement__ = 1; @@ -6356,11 +6027,7 @@ class expr_prop_fail2_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { local_scalar_t__ mu; current_statement__ = 1; @@ -6386,11 +6053,7 @@ class expr_prop_fail2_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "mu", "double", @@ -6563,10 +6226,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return expr_prop_fail2_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --O1 --print-cpp expr-prop-fail3.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace expr_prop_fail3_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -6650,19 +6322,11 @@ class expr_prop_fail3_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__; pos__ = 1; @@ -6899,15 +6563,9 @@ class expr_prop_fail3_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "expr_prop_fail3_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix a; current_statement__ = 1; @@ -7033,15 +6691,9 @@ class expr_prop_fail3_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "expr_prop_fail3_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix a; current_statement__ = 1; @@ -7168,25 +6820,13 @@ class expr_prop_fail3_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "expr_prop_fail3_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix a; current_statement__ = 1; @@ -7313,11 +6953,7 @@ class expr_prop_fail3_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { Eigen::Matrix a; current_statement__ = 1; @@ -7386,11 +7022,7 @@ class expr_prop_fail3_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "a", "double", @@ -7758,10 +7390,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return expr_prop_fail3_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --O1 --print-cpp expr-prop-fail4.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace expr_prop_fail4_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -7830,19 +7471,11 @@ class expr_prop_fail4_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__; pos__ = 1; @@ -7960,15 +7593,9 @@ class expr_prop_fail4_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "expr_prop_fail4_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ tau_phi; current_statement__ = 1; @@ -8026,15 +7653,9 @@ class expr_prop_fail4_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "expr_prop_fail4_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ tau_phi; current_statement__ = 1; @@ -8095,25 +7716,13 @@ class expr_prop_fail4_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "expr_prop_fail4_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { double tau_phi; current_statement__ = 1; @@ -8234,11 +7843,7 @@ class expr_prop_fail4_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { local_scalar_t__ tau_phi; current_statement__ = 1; @@ -8261,11 +7866,7 @@ class expr_prop_fail4_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "tau_phi", @@ -8523,10 +8124,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return expr_prop_fail4_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --O1 --print-cpp expr-prop-fail5.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace expr_prop_fail5_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -8637,14 +8247,8 @@ template ::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 69; for (int k = 1; k <= stan::math::size(y_i); ++k) { @@ -8667,14 +8271,8 @@ template ::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 76; for (int k_rev = 0; k_rev <= (stan::math::size(y_i) - 1); ++k_rev) { @@ -8707,16 +8305,10 @@ prob_uncaptured(const T0__& nind, const T1__& n_occasions, const T2__& using local_scalar_t__ = stan::promote_args_t, stan::base_type_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& p = stan::math::to_ref(p_arg__); const auto& phi = stan::math::to_ref(phi_arg__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 21; stan::math::validate_non_negative_index("chi", "nind", nind); @@ -8772,19 +8364,11 @@ class expr_prop_fail5_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__; pos__ = 1; @@ -8912,15 +8496,9 @@ class expr_prop_fail5_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "expr_prop_fail5_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ mean_phi; current_statement__ = 1; @@ -9113,15 +8691,9 @@ class expr_prop_fail5_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "expr_prop_fail5_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ mean_phi; current_statement__ = 1; @@ -9315,25 +8887,13 @@ class expr_prop_fail5_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "expr_prop_fail5_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { double mean_phi; current_statement__ = 1; @@ -9504,11 +9064,7 @@ class expr_prop_fail5_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { local_scalar_t__ mean_phi; current_statement__ = 1; @@ -9539,11 +9095,7 @@ class expr_prop_fail5_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "mean_phi", @@ -9806,10 +9358,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return expr_prop_fail5_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --O1 --print-cpp expr-prop-fail6.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace expr_prop_fail6_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -10021,14 +9582,8 @@ template ::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 146; for (int k = 1; k <= stan::math::size(y_i); ++k) { @@ -10051,14 +9606,8 @@ template ::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 152; for (int k_rev = 0; k_rev <= (stan::math::size(y_i) - 1); ++k_rev) { @@ -10090,16 +9639,10 @@ prob_uncaptured(const T0__& p_arg__, const T1__& phi_arg__, std::ostream* using local_scalar_t__ = stan::promote_args_t, stan::base_type_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& p = stan::math::to_ref(p_arg__); const auto& phi = stan::math::to_ref(phi_arg__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int n_ind; current_statement__ = 29; @@ -10181,15 +9724,11 @@ js_super_lp(const T0__& y, const T1__& first, const T2__& last, const T3__& stan::base_type_t, stan::base_type_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& p = stan::math::to_ref(p_arg__); const auto& phi = stan::math::to_ref(phi_arg__); const auto& nu = stan::math::to_ref(nu_arg__); const auto& chi = stan::math::to_ref(chi_arg__); local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int n_ind; current_statement__ = 83; @@ -10407,19 +9946,11 @@ class expr_prop_fail6_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__; pos__ = 1; @@ -10562,15 +10093,9 @@ class expr_prop_fail6_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "expr_prop_fail6_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ mean_phi; current_statement__ = 1; @@ -11008,15 +10533,9 @@ class expr_prop_fail6_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "expr_prop_fail6_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ mean_phi; current_statement__ = 1; @@ -11455,25 +10974,13 @@ class expr_prop_fail6_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "expr_prop_fail6_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { double mean_phi; current_statement__ = 1; @@ -11832,11 +11339,7 @@ class expr_prop_fail6_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { local_scalar_t__ mean_phi; current_statement__ = 1; @@ -11877,11 +11380,7 @@ class expr_prop_fail6_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "mean_phi", @@ -12235,10 +11734,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return expr_prop_fail6_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --O1 --print-cpp expr-prop-fail7.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace expr_prop_fail7_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -12298,19 +11806,11 @@ class expr_prop_fail7_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__; pos__ = 1; @@ -12451,15 +11951,9 @@ class expr_prop_fail7_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "expr_prop_fail7_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix pi; current_statement__ = 1; @@ -12534,15 +12028,9 @@ class expr_prop_fail7_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "expr_prop_fail7_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { stan::math::var_value> pi; current_statement__ = 1; @@ -12619,25 +12107,13 @@ class expr_prop_fail7_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "expr_prop_fail7_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix pi; current_statement__ = 1; @@ -12717,11 +12193,7 @@ class expr_prop_fail7_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { Eigen::Matrix pi; current_statement__ = 1; @@ -12756,11 +12228,7 @@ class expr_prop_fail7_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "pi", "double", @@ -12995,10 +12463,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return expr_prop_fail7_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --O1 --print-cpp expr-prop-fail8.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace expr_prop_fail8_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -13044,19 +12521,11 @@ class expr_prop_fail8_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__; pos__ = 1; @@ -13161,15 +12630,9 @@ class expr_prop_fail8_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "expr_prop_fail8_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ beta0; current_statement__ = 1; @@ -13233,15 +12696,9 @@ class expr_prop_fail8_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "expr_prop_fail8_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ beta0; current_statement__ = 1; @@ -13309,25 +12766,13 @@ class expr_prop_fail8_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "expr_prop_fail8_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { double beta0; current_statement__ = 1; @@ -13398,11 +12843,7 @@ class expr_prop_fail8_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { local_scalar_t__ beta0; current_statement__ = 1; @@ -13443,11 +12884,7 @@ class expr_prop_fail8_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "beta0", "double", @@ -13699,10 +13136,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return expr_prop_fail8_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --O1 --print-cpp fails-test.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace fails_test_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -13808,14 +13254,8 @@ template ::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 64; for (int k = 1; k <= stan::math::size(y_i); ++k) { @@ -13838,14 +13278,8 @@ template ::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 71; for (int k_rev = 0; k_rev <= (stan::math::size(y_i) - 1); ++k_rev) { @@ -13878,16 +13312,10 @@ prob_uncaptured(const T0__& nind, const T1__& n_occasions, const T2__& using local_scalar_t__ = stan::promote_args_t, stan::base_type_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& p = stan::math::to_ref(p_arg__); const auto& phi = stan::math::to_ref(phi_arg__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 16; stan::math::validate_non_negative_index("chi", "nind", nind); @@ -13945,19 +13373,11 @@ class fails_test_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "fails_test_model_namespace::fails_test_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__; pos__ = 1; @@ -14123,15 +13543,9 @@ class fails_test_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "fails_test_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ mean_p; current_statement__ = 1; @@ -14311,15 +13725,9 @@ class fails_test_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "fails_test_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ mean_p; current_statement__ = 1; @@ -14500,25 +13908,13 @@ class fails_test_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "fails_test_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { double mean_p; current_statement__ = 1; @@ -14669,11 +14065,7 @@ class fails_test_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { local_scalar_t__ mean_p; current_statement__ = 1; @@ -14696,11 +14088,7 @@ class fails_test_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "mean_p", "double", @@ -14928,10 +14316,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return fails_test_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --O1 --print-cpp function-in-function-inline.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace function_in_function_inline_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -14963,12 +14360,8 @@ stan::promote_args_t> inner_lpdf(const T0__& phi_arg__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& phi = stan::math::to_ref(phi_arg__); local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 2; return stan::math::sum(phi); @@ -14984,12 +14377,8 @@ stan::promote_args_t> outer_lpdf(const T0__& phi_arg__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& phi = stan::math::to_ref(phi_arg__); local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 6; return inner_lpdf(phi, pstream__); @@ -15008,19 +14397,11 @@ class function_in_function_inline_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__; pos__ = 1; @@ -15068,15 +14449,9 @@ class function_in_function_inline_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "function_in_function_inline_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ ret = DUMMY_VAR__; local_scalar_t__ inline_outer_lpdf_return_sym12__; @@ -15112,15 +14487,9 @@ class function_in_function_inline_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "function_in_function_inline_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ ret = DUMMY_VAR__; local_scalar_t__ inline_outer_lpdf_return_sym9__; @@ -15157,25 +14526,13 @@ class function_in_function_inline_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "function_in_function_inline_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { if (stan::math::logical_negation( (stan::math::primitive_value(emit_transformed_parameters__) || @@ -15199,11 +14556,7 @@ class function_in_function_inline_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } template * = nullptr> inline void @@ -15212,11 +14565,7 @@ class function_in_function_inline_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } inline void get_param_names(std::vector& names__, const bool @@ -15349,10 +14698,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return function_in_function_inline_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --O1 --print-cpp function-in-function-loops.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace function_in_function_loops_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -15392,14 +14750,8 @@ stan::promote_args_t do_something(const T0__& x, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 13; return x; @@ -15415,15 +14767,9 @@ stan::promote_args_t> summer(const T0__& et_arg__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& et = stan::math::to_ref(et_arg__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int N; current_statement__ = 4; @@ -15454,19 +14800,11 @@ class function_in_function_loops_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 12; context__.validate_dims("data initialization", "N", "int", @@ -15500,15 +14838,9 @@ class function_in_function_loops_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "function_in_function_loops_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { current_statement__ = 1; stan::math::validate_non_negative_index("eta", "N", N); @@ -15570,15 +14902,9 @@ class function_in_function_loops_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "function_in_function_loops_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { current_statement__ = 1; stan::math::validate_non_negative_index("eta", "N", N); @@ -15641,25 +14967,13 @@ class function_in_function_loops_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "function_in_function_loops_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { if (stan::math::logical_negation( (stan::math::primitive_value(emit_transformed_parameters__) || @@ -15683,11 +14997,7 @@ class function_in_function_loops_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } template * = nullptr> inline void @@ -15696,11 +15006,7 @@ class function_in_function_loops_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } inline void get_param_names(std::vector& names__, const bool @@ -15833,10 +15139,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return function_in_function_loops_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --O1 --print-cpp fuzz-div0.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace fuzz_div0_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -15856,19 +15171,11 @@ class fuzz_div0_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "fuzz_div0_model_namespace::fuzz_div0_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; num_params_r__ = 0U; } inline std::string model_name() const final { @@ -15892,15 +15199,9 @@ class fuzz_div0_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "fuzz_div0_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { std::vector T = std::vector(6, std::numeric_limits::min()); @@ -15937,15 +15238,9 @@ class fuzz_div0_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "fuzz_div0_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { std::vector T = std::vector(6, std::numeric_limits::min()); @@ -15983,25 +15278,13 @@ class fuzz_div0_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "fuzz_div0_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { if (stan::math::logical_negation( (stan::math::primitive_value(emit_transformed_parameters__) || @@ -16025,11 +15308,7 @@ class fuzz_div0_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } template * = nullptr> inline void @@ -16038,11 +15317,7 @@ class fuzz_div0_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } inline void get_param_names(std::vector& names__, const bool @@ -16176,6 +15451,9 @@ stan::math::profile_map& get_stan_profile_data() { return fuzz_div0_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif Warning in 'fuzz-div0.stan', line 2, column 34: Found int division: 0 / 0 Values will be rounded towards zero. If rounding is not desired you can @@ -16193,6 +15471,12 @@ Warning in 'fuzz-div0.stan', line 2, column 41: Found int division: $ ../../../../../install/default/bin/stanc --O1 --print-cpp initialize-SoA.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace initialize_SoA_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -16215,19 +15499,11 @@ class initialize_SoA_model final : public model_base_crtp random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "initialize_SoA_model_namespace::initialize_SoA_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; num_params_r__ = 3 + (3 * 4); } inline std::string model_name() const final { @@ -16251,15 +15527,9 @@ class initialize_SoA_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "initialize_SoA_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix y; current_statement__ = 1; @@ -16304,15 +15574,9 @@ class initialize_SoA_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "initialize_SoA_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { stan::math::var_value> y; current_statement__ = 1; @@ -16360,25 +15624,13 @@ class initialize_SoA_model final : public model_base_crtp stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "initialize_SoA_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix y; current_statement__ = 1; @@ -16426,11 +15678,7 @@ class initialize_SoA_model final : public model_base_crtp stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { Eigen::Matrix y; current_statement__ = 1; @@ -16462,11 +15710,7 @@ class initialize_SoA_model final : public model_base_crtp using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "y", "double", @@ -16685,10 +15929,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return initialize_SoA_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --O1 --print-cpp inline-functions-varmat.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace inline_functions_varmat_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -16726,15 +15979,9 @@ Eigen::Matrix>,-1,1> single_ret_fun(const T0__& A_arg__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& A = stan::math::to_ref(A_arg__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 10; return A; @@ -16750,15 +15997,9 @@ Eigen::Matrix>,-1,1> multi_ret_fun(const T0__& A_arg__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& A = stan::math::to_ref(A_arg__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { Eigen::Matrix B = Eigen::Matrix::Constant(5, DUMMY_VAR__); @@ -16784,19 +16025,11 @@ class inline_functions_varmat_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; num_params_r__ = 5 + 5; } inline std::string model_name() const final { @@ -16820,15 +16053,9 @@ class inline_functions_varmat_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "inline_functions_varmat_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix p_single_ret_vec; current_statement__ = 1; @@ -16892,15 +16119,9 @@ class inline_functions_varmat_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "inline_functions_varmat_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { stan::math::var_value> p_single_ret_vec; current_statement__ = 1; @@ -16972,25 +16193,13 @@ class inline_functions_varmat_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "inline_functions_varmat_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix p_single_ret_vec; current_statement__ = 1; @@ -17062,11 +16271,7 @@ class inline_functions_varmat_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { Eigen::Matrix p_single_ret_vec; current_statement__ = 1; @@ -17091,11 +16296,7 @@ class inline_functions_varmat_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "p_single_ret_vec", @@ -17316,10 +16517,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return inline_functions_varmat_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --O1 --print-cpp inline-tdata.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace inline_tdata_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -17346,14 +16556,8 @@ Eigen::Matrix foo(const T0__& N, const T1__& M, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 8; return stan::math::promote_scalar( @@ -17374,19 +16578,11 @@ class inline_tdata_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "inline_tdata_model_namespace::inline_tdata_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__; pos__ = 1; @@ -17436,15 +16632,9 @@ class inline_tdata_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "inline_tdata_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ alpha; current_statement__ = 1; @@ -17474,15 +16664,9 @@ class inline_tdata_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "inline_tdata_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ alpha; current_statement__ = 1; @@ -17513,25 +16697,13 @@ class inline_tdata_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "inline_tdata_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { double alpha; current_statement__ = 1; @@ -17559,11 +16731,7 @@ class inline_tdata_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { local_scalar_t__ alpha; current_statement__ = 1; @@ -17580,11 +16748,7 @@ class inline_tdata_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "alpha", "double", @@ -17730,10 +16894,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return inline_tdata_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --O1 --print-cpp inliner-same-names.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace inliner_same_names_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -17763,15 +16936,9 @@ Eigen::Matrix>,-1,1> foo(const T0__& oR_arg__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& oR = stan::math::to_ref(oR_arg__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int ot; current_statement__ = 3; @@ -17796,19 +16963,11 @@ class inliner_same_names_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 6; context__.validate_dims("data initialization", "N", "int", @@ -17846,15 +17005,9 @@ class inliner_same_names_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "inliner_same_names_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix R = Eigen::Matrix::Constant(N, DUMMY_VAR__); @@ -17893,15 +17046,9 @@ class inliner_same_names_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "inliner_same_names_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { stan::math::var_value> R = stan::math::var_value>(Eigen::Matrix::Constant(N, @@ -17948,25 +17095,13 @@ class inliner_same_names_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "inliner_same_names_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix R = Eigen::Matrix::Constant(N, @@ -18013,11 +17148,7 @@ class inliner_same_names_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } template * = nullptr> inline void @@ -18026,11 +17157,7 @@ class inliner_same_names_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } inline void get_param_names(std::vector& names__, const bool @@ -18191,10 +17318,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return inliner_same_names_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --O1 --print-cpp inlining-fail2.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace inlining_fail2_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -18409,14 +17545,8 @@ template ::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 145; for (int k = 1; k <= stan::math::size(y_i); ++k) { @@ -18439,14 +17569,8 @@ template ::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 151; for (int k_rev = 0; k_rev <= (stan::math::size(y_i) - 1); ++k_rev) { @@ -18478,16 +17602,10 @@ prob_uncaptured(const T0__& p_arg__, const T1__& phi_arg__, std::ostream* using local_scalar_t__ = stan::promote_args_t, stan::base_type_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& p = stan::math::to_ref(p_arg__); const auto& phi = stan::math::to_ref(phi_arg__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int n_ind; current_statement__ = 20; @@ -18567,15 +17685,11 @@ jolly_seber_lp(const T0__& y, const T1__& first, const T2__& last, stan::base_type_t, stan::base_type_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& p = stan::math::to_ref(p_arg__); const auto& phi = stan::math::to_ref(phi_arg__); const auto& gamma = stan::math::to_ref(gamma_arg__); const auto& chi = stan::math::to_ref(chi_arg__); local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int n_ind; current_statement__ = 84; @@ -18789,15 +17903,9 @@ Eigen::Matrix>,-1,1> seq_cprob(const T0__& gamma_arg__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& gamma = stan::math::to_ref(gamma_arg__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int N; current_statement__ = 46; @@ -18843,19 +17951,11 @@ class inlining_fail2_model final : public model_base_crtp random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "inlining_fail2_model_namespace::inlining_fail2_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__; pos__ = 1; @@ -19000,15 +18100,9 @@ class inlining_fail2_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "inlining_fail2_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ mean_phi; current_statement__ = 1; @@ -19411,15 +18505,9 @@ class inlining_fail2_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "inlining_fail2_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ mean_phi; current_statement__ = 1; @@ -19823,25 +18911,13 @@ class inlining_fail2_model final : public model_base_crtp stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "inlining_fail2_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { double mean_phi; current_statement__ = 1; @@ -20192,11 +19268,7 @@ class inlining_fail2_model final : public model_base_crtp stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { local_scalar_t__ mean_phi; current_statement__ = 1; @@ -20233,11 +19305,7 @@ class inlining_fail2_model final : public model_base_crtp using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "mean_phi", @@ -20580,10 +19648,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return inlining_fail2_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --O1 --print-cpp lcm-experiment.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace lcm_experiment_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -20609,19 +19686,11 @@ class lcm_experiment_model final : public model_base_crtp random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "lcm_experiment_model_namespace::lcm_experiment_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("data initialization", "j", "int", @@ -20673,15 +19742,9 @@ class lcm_experiment_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "lcm_experiment_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; lp_accum__.add(lp__); return lp_accum__.sum(); } @@ -20699,15 +19762,9 @@ class lcm_experiment_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "lcm_experiment_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; lp_accum__.add(lp__); return lp_accum__.sum(); } @@ -20726,25 +19783,13 @@ class lcm_experiment_model final : public model_base_crtp stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "lcm_experiment_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { if (stan::math::logical_negation( (stan::math::primitive_value(emit_transformed_parameters__) || @@ -20768,11 +19813,7 @@ class lcm_experiment_model final : public model_base_crtp stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } template * = nullptr> inline void @@ -20781,11 +19822,7 @@ class lcm_experiment_model final : public model_base_crtp using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } inline void get_param_names(std::vector& names__, const bool @@ -20918,10 +19955,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return lcm_experiment_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --O1 --print-cpp lcm-experiment2.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace lcm_experiment2_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -20945,19 +19991,11 @@ class lcm_experiment2_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; num_params_r__ = 1; } inline std::string model_name() const final { @@ -20981,15 +20019,9 @@ class lcm_experiment2_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "lcm_experiment2_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ x; current_statement__ = 1; @@ -21030,15 +20062,9 @@ class lcm_experiment2_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "lcm_experiment2_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ x; current_statement__ = 1; @@ -21080,25 +20106,13 @@ class lcm_experiment2_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "lcm_experiment2_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { double x; current_statement__ = 1; @@ -21126,11 +20140,7 @@ class lcm_experiment2_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { local_scalar_t__ x; current_statement__ = 1; @@ -21147,11 +20157,7 @@ class lcm_experiment2_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "x", "double", @@ -21297,10 +20303,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return lcm_experiment2_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --O1 --print-cpp lcm-fails.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace lcm_fails_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -21323,19 +20338,11 @@ class lcm_fails_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "lcm_fails_model_namespace::lcm_fails_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 3; context__.validate_dims("data initialization", "J", "int", @@ -21381,15 +20388,9 @@ class lcm_fails_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "lcm_fails_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { std::vector theta; current_statement__ = 1; @@ -21418,15 +20419,9 @@ class lcm_fails_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "lcm_fails_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { std::vector theta; current_statement__ = 1; @@ -21456,25 +20451,13 @@ class lcm_fails_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "lcm_fails_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { std::vector theta; current_statement__ = 1; @@ -21502,11 +20485,7 @@ class lcm_fails_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { std::vector theta; current_statement__ = 1; @@ -21524,11 +20503,7 @@ class lcm_fails_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "theta", "double", @@ -21682,10 +20657,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return lcm_fails_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --O1 --print-cpp lcm-fails2.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace lcm_fails2_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -21786,14 +20770,8 @@ template ::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 59; for (int k = 1; k <= stan::math::size(y_i); ++k) { @@ -21816,14 +20794,8 @@ template ::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 66; for (int k_rev = 0; k_rev <= (stan::math::size(y_i) - 1); ++k_rev) { @@ -21856,16 +20828,10 @@ prob_uncaptured(const T0__& nind, const T1__& n_occasions, const T2__& using local_scalar_t__ = stan::promote_args_t, stan::base_type_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& p = stan::math::to_ref(p_arg__); const auto& phi = stan::math::to_ref(phi_arg__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 16; stan::math::validate_non_negative_index("chi", "nind", nind); @@ -21921,19 +20887,11 @@ class lcm_fails2_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "lcm_fails2_model_namespace::lcm_fails2_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__; pos__ = 1; @@ -22059,15 +21017,9 @@ class lcm_fails2_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "lcm_fails2_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ mean_phi; current_statement__ = 1; @@ -22242,15 +21194,9 @@ class lcm_fails2_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "lcm_fails2_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ mean_phi; current_statement__ = 1; @@ -22426,25 +21372,13 @@ class lcm_fails2_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "lcm_fails2_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { double mean_phi; current_statement__ = 1; @@ -22590,11 +21524,7 @@ class lcm_fails2_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { local_scalar_t__ mean_phi; current_statement__ = 1; @@ -22615,11 +21545,7 @@ class lcm_fails2_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "mean_phi", @@ -22829,10 +21755,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return lcm_fails2_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --O1 --print-cpp lupdf-inlining.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace lupdf_inlining_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -22878,11 +21813,7 @@ stan::promote_args_t foo_lpdf(const T0__& x, const T1__& mu, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 5; return stan::math::normal_lpdf(x, mu, 1); @@ -22899,11 +21830,7 @@ stan::promote_args_t bar_lpmf(const T0__& n, const T1__& mu, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 6; return stan::math::poisson_lpmf(n, mu); @@ -22918,11 +21845,7 @@ template baz_lpdf(const T0__& x, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 11; return foo_lpdf(x, 0.5, pstream__); @@ -22939,19 +21862,11 @@ class lupdf_inlining_model final : public model_base_crtp random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "lupdf_inlining_model_namespace::lupdf_inlining_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 8; context__.validate_dims("data initialization", "n", "int", @@ -22985,15 +21900,9 @@ class lupdf_inlining_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "lupdf_inlining_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ mu; current_statement__ = 1; @@ -23049,15 +21958,9 @@ class lupdf_inlining_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "lupdf_inlining_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ mu; current_statement__ = 1; @@ -23114,25 +22017,13 @@ class lupdf_inlining_model final : public model_base_crtp stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "lupdf_inlining_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { double mu; current_statement__ = 1; @@ -23195,11 +22086,7 @@ class lupdf_inlining_model final : public model_base_crtp stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { local_scalar_t__ mu; current_statement__ = 1; @@ -23216,11 +22103,7 @@ class lupdf_inlining_model final : public model_base_crtp using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "mu", "double", @@ -23393,10 +22276,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return lupdf_inlining_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --O1 --print-cpp off-dce.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace off_dce_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -23472,19 +22364,11 @@ class off_dce_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "off_dce_model_namespace::off_dce_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__; pos__ = 1; @@ -23615,15 +22499,9 @@ class off_dce_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "off_dce_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ alpha_occ; current_statement__ = 1; @@ -23698,15 +22576,9 @@ class off_dce_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "off_dce_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ alpha_occ; current_statement__ = 1; @@ -23782,25 +22654,13 @@ class off_dce_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "off_dce_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { double alpha_occ; current_statement__ = 1; @@ -23910,11 +22770,7 @@ class off_dce_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { local_scalar_t__ alpha_occ; current_statement__ = 1; @@ -23943,11 +22799,7 @@ class off_dce_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "alpha_occ", @@ -24191,10 +23043,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return off_dce_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --O1 --print-cpp off-small.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace off_small_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -24254,19 +23115,11 @@ class off_small_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "off_small_model_namespace::off_small_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__; pos__ = 1; @@ -24393,15 +23246,9 @@ class off_small_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "off_small_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ beta; current_statement__ = 1; @@ -24498,15 +23345,9 @@ class off_small_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "off_small_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ beta; current_statement__ = 1; @@ -24604,25 +23445,13 @@ class off_small_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "off_small_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { double beta; current_statement__ = 1; @@ -24723,11 +23552,7 @@ class off_small_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { local_scalar_t__ beta; current_statement__ = 1; @@ -24776,11 +23601,7 @@ class off_small_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "beta", "double", @@ -25068,10 +23889,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return off_small_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --O1 --print-cpp optimizations.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace optimizations_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -25199,11 +24029,7 @@ nrfun_lp(const T0__& x, const T1__& y, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 92; if (stan::math::logical_gt(x, 342)) { @@ -25221,14 +24047,8 @@ template >*> int rfun(const T0__& y, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 9; if (stan::math::logical_gt(y, 2)) { @@ -25246,11 +24066,7 @@ template int rfun_lp(T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 62; lp_accum__.add(2); @@ -25269,19 +24085,11 @@ class optimizations_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "optimizations_model_namespace::optimizations_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; num_params_r__ = 1 + 1 + (3 * 2) + 2 + 3; } inline std::string model_name() const final { @@ -25305,15 +24113,9 @@ class optimizations_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "optimizations_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ theta; current_statement__ = 1; @@ -25636,15 +24438,9 @@ class optimizations_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "optimizations_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ theta; current_statement__ = 1; @@ -25970,25 +24766,13 @@ class optimizations_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "optimizations_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { double theta; current_statement__ = 1; @@ -26034,11 +24818,7 @@ class optimizations_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { local_scalar_t__ theta; current_statement__ = 1; @@ -26077,11 +24857,7 @@ class optimizations_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "theta", "double", @@ -26332,10 +25108,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return optimizations_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --O1 --print-cpp overloaded-fn.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace overloaded_fn_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -26361,14 +25146,8 @@ template dumb(const T0__& x, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 2; return (x + 0.5); @@ -26381,14 +25160,8 @@ template >*> double dumb(const T0__& x, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 4; return (x - 0.5); @@ -26405,19 +25178,11 @@ class overloaded_fn_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "overloaded_fn_model_namespace::overloaded_fn_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; num_params_r__ = 0U; } inline std::string model_name() const final { @@ -26441,15 +25206,9 @@ class overloaded_fn_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "overloaded_fn_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { current_statement__ = 1; lp_accum__.add(dumb(1.0, pstream__)); @@ -26473,15 +25232,9 @@ class overloaded_fn_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "overloaded_fn_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { current_statement__ = 1; lp_accum__.add(dumb(1.0, pstream__)); @@ -26506,25 +25259,13 @@ class overloaded_fn_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "overloaded_fn_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { if (stan::math::logical_negation( (stan::math::primitive_value(emit_transformed_parameters__) || @@ -26548,11 +25289,7 @@ class overloaded_fn_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } template * = nullptr> inline void @@ -26561,11 +25298,7 @@ class overloaded_fn_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } inline void get_param_names(std::vector& names__, const bool @@ -26698,10 +25431,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return overloaded_fn_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --O1 --print-cpp overloaded-fn2.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace overloaded_fn2_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -26735,15 +25477,9 @@ stan::promote_args_t> foo(const T0__& x_arg__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& x = stan::math::to_ref(x_arg__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 3; return stan::math::sum(x); @@ -26756,11 +25492,7 @@ template void bar_lp(T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; lp_accum__.add(stan::model::rvalue(foo(1.0, pstream__), "foo(1.0)", @@ -26777,14 +25509,8 @@ Eigen::Matrix,-1,1> foo(const T0__& x, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 6; return (Eigen::Matrix(1) << x).finished(); @@ -26801,19 +25527,11 @@ class overloaded_fn2_model final : public model_base_crtp random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "overloaded_fn2_model_namespace::overloaded_fn2_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; num_params_r__ = 0U; } inline std::string model_name() const final { @@ -26837,15 +25555,9 @@ class overloaded_fn2_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "overloaded_fn2_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { current_statement__ = 1; lp_accum__.add(stan::model::rvalue(foo(1.0, pstream__), "foo(1.0)", @@ -26870,15 +25582,9 @@ class overloaded_fn2_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "overloaded_fn2_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { current_statement__ = 1; lp_accum__.add(stan::model::rvalue(foo(1.0, pstream__), "foo(1.0)", @@ -26904,25 +25610,13 @@ class overloaded_fn2_model final : public model_base_crtp stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "overloaded_fn2_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { if (stan::math::logical_negation( (stan::math::primitive_value(emit_transformed_parameters__) || @@ -26946,11 +25640,7 @@ class overloaded_fn2_model final : public model_base_crtp stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } template * = nullptr> inline void @@ -26959,11 +25649,7 @@ class overloaded_fn2_model final : public model_base_crtp using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } inline void get_param_names(std::vector& names__, const bool @@ -27096,10 +25782,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return overloaded_fn2_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --O1 --print-cpp partial-eval-tuple.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace partial_eval_tuple_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -27119,19 +25814,11 @@ class partial_eval_tuple_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; num_params_r__ = 0U; } inline std::string model_name() const final { @@ -27155,15 +25842,9 @@ class partial_eval_tuple_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "partial_eval_tuple_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { std::tuple> x; current_statement__ = 2; @@ -27194,15 +25875,9 @@ class partial_eval_tuple_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "partial_eval_tuple_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { std::tuple> x; current_statement__ = 2; @@ -27234,25 +25909,13 @@ class partial_eval_tuple_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "partial_eval_tuple_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { std::tuple> x = std::tuple>{std::numeric_limits::quiet_NaN( @@ -27287,11 +25950,7 @@ class partial_eval_tuple_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } template * = nullptr> inline void @@ -27300,11 +25959,7 @@ class partial_eval_tuple_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } inline void get_param_names(std::vector& names__, const bool @@ -27470,10 +26125,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return partial_eval_tuple_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --O1 --print-cpp partial-eval.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace partial_eval_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -27525,19 +26189,11 @@ class partial_eval_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "partial_eval_model_namespace::partial_eval_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__; pos__ = 1; @@ -27663,15 +26319,9 @@ class partial_eval_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "partial_eval_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix a; current_statement__ = 1; @@ -27752,15 +26402,9 @@ class partial_eval_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "partial_eval_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix a; current_statement__ = 1; @@ -27842,25 +26486,13 @@ class partial_eval_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "partial_eval_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix a; current_statement__ = 1; @@ -27929,11 +26561,7 @@ class partial_eval_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { Eigen::Matrix a; current_statement__ = 1; @@ -27970,11 +26598,7 @@ class partial_eval_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "a", "double", @@ -28215,10 +26839,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return partial_eval_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --O1 --print-cpp partial_eval_multiply.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace partial_eval_multiply_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -28249,19 +26882,11 @@ class partial_eval_multiply_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__; pos__ = 1; @@ -28345,15 +26970,9 @@ class partial_eval_multiply_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "partial_eval_multiply_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix m2; current_statement__ = 1; @@ -28403,15 +27022,9 @@ class partial_eval_multiply_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "partial_eval_multiply_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { stan::math::var_value> m2; current_statement__ = 1; @@ -28464,25 +27077,13 @@ class partial_eval_multiply_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "partial_eval_multiply_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix m2; current_statement__ = 1; @@ -28514,11 +27115,7 @@ class partial_eval_multiply_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { Eigen::Matrix m2; current_statement__ = 1; @@ -28543,11 +27140,7 @@ class partial_eval_multiply_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "m2", "double", @@ -28755,10 +27348,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return partial_eval_multiply_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --O1 --print-cpp partial_eval_zeros.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace partial_eval_zeros_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -28781,19 +27383,11 @@ class partial_eval_zeros_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__; pos__ = 1; @@ -28846,15 +27440,9 @@ class partial_eval_zeros_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "partial_eval_zeros_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; lp_accum__.add(lp__); return lp_accum__.sum(); } @@ -28872,15 +27460,9 @@ class partial_eval_zeros_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "partial_eval_zeros_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; lp_accum__.add(lp__); return lp_accum__.sum(); } @@ -28899,25 +27481,13 @@ class partial_eval_zeros_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "partial_eval_zeros_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { if (stan::math::logical_negation( (stan::math::primitive_value(emit_transformed_parameters__) || @@ -28941,11 +27511,7 @@ class partial_eval_zeros_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } template * = nullptr> inline void @@ -28954,11 +27520,7 @@ class partial_eval_zeros_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } inline void get_param_names(std::vector& names__, const bool @@ -29091,10 +27653,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return partial_eval_zeros_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --O1 --print-cpp stalled1-failure.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace stalled1_failure_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -29152,19 +27723,11 @@ class stalled1_failure_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__; pos__ = 1; @@ -29278,15 +27841,9 @@ class stalled1_failure_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "stalled1_failure_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ alpha0; current_statement__ = 1; @@ -29368,15 +27925,9 @@ class stalled1_failure_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "stalled1_failure_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ alpha0; current_statement__ = 1; @@ -29460,25 +28011,13 @@ class stalled1_failure_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "stalled1_failure_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { double alpha0; current_statement__ = 1; @@ -29539,11 +28078,7 @@ class stalled1_failure_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { local_scalar_t__ alpha0; current_statement__ = 1; @@ -29589,11 +28124,7 @@ class stalled1_failure_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "alpha0", "double", @@ -29827,10 +28358,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return stalled1_failure_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --O1 --print-cpp unenforce-initialize-should-fail.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace unenforce_initialize_should_fail_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -29856,19 +28396,11 @@ class unenforce_initialize_should_fail_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__; pos__ = 1; @@ -29906,15 +28438,9 @@ class unenforce_initialize_should_fail_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "unenforce_initialize_should_fail_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ param; current_statement__ = 1; @@ -29957,15 +28483,9 @@ class unenforce_initialize_should_fail_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "unenforce_initialize_should_fail_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ param; current_statement__ = 1; @@ -30009,25 +28529,13 @@ class unenforce_initialize_should_fail_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "unenforce_initialize_should_fail_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { double param; current_statement__ = 1; @@ -30080,11 +28588,7 @@ class unenforce_initialize_should_fail_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { local_scalar_t__ param; current_statement__ = 1; @@ -30101,11 +28605,7 @@ class unenforce_initialize_should_fail_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "param", "double", @@ -30275,10 +28775,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return unenforce_initialize_should_fail_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc --O1 --print-cpp unenforce-initialize.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace unenforce_initialize_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -30306,19 +28815,11 @@ class unenforce_initialize_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; num_params_r__ = 1; } inline std::string model_name() const final { @@ -30342,15 +28843,9 @@ class unenforce_initialize_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "unenforce_initialize_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ y; current_statement__ = 1; @@ -30396,15 +28891,9 @@ class unenforce_initialize_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "unenforce_initialize_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ y; current_statement__ = 1; @@ -30451,25 +28940,13 @@ class unenforce_initialize_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "unenforce_initialize_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { double y; current_statement__ = 1; @@ -30526,11 +29003,7 @@ class unenforce_initialize_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { local_scalar_t__ y; current_statement__ = 1; @@ -30547,11 +29020,7 @@ class unenforce_initialize_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "y", "double", @@ -30727,11 +29196,20 @@ stan::math::profile_map& get_stan_profile_data() { return unenforce_initialize_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif Warning in 'unenforce-initialize.stan', line 8, column 2: Assignment of variable to itself during declaration. This is almost certainly a bug. $ ../../../../../install/default/bin/stanc --O1 --print-cpp unroll-limit.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace unroll_limit_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -30763,19 +29241,11 @@ class unroll_limit_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "unroll_limit_model_namespace::unroll_limit_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; num_params_r__ = 0U; } inline std::string model_name() const final { @@ -30799,15 +29269,9 @@ class unroll_limit_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "unroll_limit_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; lp_accum__.add(lp__); return lp_accum__.sum(); } @@ -30825,15 +29289,9 @@ class unroll_limit_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "unroll_limit_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; lp_accum__.add(lp__); return lp_accum__.sum(); } @@ -30852,25 +29310,13 @@ class unroll_limit_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "unroll_limit_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { if (stan::math::logical_negation( (stan::math::primitive_value(emit_transformed_parameters__) || @@ -30921,11 +29367,7 @@ class unroll_limit_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } template * = nullptr> inline void @@ -30934,11 +29376,7 @@ class unroll_limit_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } inline void get_param_names(std::vector& names__, const bool @@ -31084,3 +29522,6 @@ stan::math::profile_map& get_stan_profile_data() { return unroll_limit_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif diff --git a/test/integration/good/compiler-optimizations/mem_patterns/cpp.expected b/test/integration/good/compiler-optimizations/mem_patterns/cpp.expected index 3f4ace7c4..f1c5f41ab 100644 --- a/test/integration/good/compiler-optimizations/mem_patterns/cpp.expected +++ b/test/integration/good/compiler-optimizations/mem_patterns/cpp.expected @@ -1,6 +1,12 @@ $ ../../../../../../install/default/bin/stanc -fsoa --print-cpp ad_scalar_data_matrix.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace ad_scalar_data_matrix_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -61,19 +67,11 @@ class ad_scalar_data_matrix_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__ = std::numeric_limits::min(); pos__ = 1; @@ -156,15 +154,9 @@ class ad_scalar_data_matrix_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "ad_scalar_data_matrix_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ alpha = DUMMY_VAR__; current_statement__ = 1; @@ -322,15 +314,9 @@ class ad_scalar_data_matrix_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "ad_scalar_data_matrix_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ alpha = DUMMY_VAR__; current_statement__ = 1; @@ -513,25 +499,13 @@ class ad_scalar_data_matrix_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "ad_scalar_data_matrix_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { double alpha = std::numeric_limits::quiet_NaN(); current_statement__ = 1; @@ -569,11 +543,7 @@ class ad_scalar_data_matrix_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { local_scalar_t__ alpha = DUMMY_VAR__; current_statement__ = 1; @@ -601,11 +571,7 @@ class ad_scalar_data_matrix_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "alpha", "double", @@ -789,10 +755,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return ad_scalar_data_matrix_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../../install/default/bin/stanc -fsoa --print-cpp complex-fails.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace complex_fails_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -810,19 +785,11 @@ class complex_fails_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "complex_fails_model_namespace::complex_fails_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; num_params_r__ = (10 * 10); } inline std::string model_name() const final { @@ -846,15 +813,9 @@ class complex_fails_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "complex_fails_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix A_p = Eigen::Matrix::Constant(10, 10, DUMMY_VAR__); @@ -886,15 +847,9 @@ class complex_fails_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "complex_fails_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix A_p = Eigen::Matrix::Constant(10, 10, DUMMY_VAR__); @@ -927,25 +882,13 @@ class complex_fails_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "complex_fails_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix A_p = Eigen::Matrix::Constant(10, 10, @@ -985,11 +928,7 @@ class complex_fails_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { Eigen::Matrix A_p = Eigen::Matrix::Constant(10, 10, DUMMY_VAR__); @@ -1009,11 +948,7 @@ class complex_fails_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "A_p", "double", @@ -1221,10 +1156,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return complex_fails_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../../install/default/bin/stanc -fsoa --print-cpp constraints.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace constraints_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -1347,19 +1291,11 @@ class constraints_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "constraints_model_namespace::constraints_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__ = std::numeric_limits::min(); pos__ = 1; @@ -1608,15 +1544,9 @@ class constraints_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "constraints_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix high_low_est = Eigen::Matrix::Constant(N, DUMMY_VAR__); @@ -1914,15 +1844,9 @@ class constraints_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "constraints_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { stan::math::var_value> high_low_est = stan::math::var_value>(Eigen::Matrix::Constant(N, @@ -2277,25 +2201,13 @@ class constraints_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "constraints_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix high_low_est = Eigen::Matrix::Constant(N, @@ -2619,11 +2531,7 @@ class constraints_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { Eigen::Matrix high_low_est = Eigen::Matrix::Constant(N, DUMMY_VAR__); @@ -2777,11 +2685,7 @@ class constraints_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "high_low_est", @@ -3547,10 +3451,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return constraints_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../../install/default/bin/stanc -fsoa --print-cpp deep_dependence.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace deep_dependence_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -3579,19 +3492,11 @@ class deep_dependence_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; num_params_r__ = (10 * 10); } inline std::string model_name() const final { @@ -3615,15 +3520,9 @@ class deep_dependence_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "deep_dependence_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix X_p = Eigen::Matrix::Constant(10, 10, DUMMY_VAR__); @@ -3696,15 +3595,9 @@ class deep_dependence_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "deep_dependence_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix X_p = Eigen::Matrix::Constant(10, 10, DUMMY_VAR__); @@ -3778,25 +3671,13 @@ class deep_dependence_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "deep_dependence_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix X_p = Eigen::Matrix::Constant(10, 10, @@ -3889,11 +3770,7 @@ class deep_dependence_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { Eigen::Matrix X_p = Eigen::Matrix::Constant(10, 10, DUMMY_VAR__); @@ -3913,11 +3790,7 @@ class deep_dependence_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "X_p", "double", @@ -4204,10 +4077,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return deep_dependence_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../../install/default/bin/stanc -fsoa --print-cpp indexing.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace indexing_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -4342,14 +4224,8 @@ template >*> int mask_fun(const T0__& i, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 112; return i; @@ -4365,15 +4241,9 @@ Eigen::Matrix>,-1,1> udf_fun(const T0__& A_arg__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& A = stan::math::to_ref(A_arg__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 114; return A; @@ -4396,19 +4266,11 @@ class indexing_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "indexing_model_namespace::indexing_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__ = std::numeric_limits::min(); pos__ = 1; @@ -4594,15 +4456,9 @@ class indexing_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "indexing_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ alpha = DUMMY_VAR__; current_statement__ = 1; @@ -5010,15 +4866,9 @@ class indexing_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "indexing_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ alpha = DUMMY_VAR__; current_statement__ = 1; @@ -5469,25 +5319,13 @@ class indexing_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "indexing_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { double alpha = std::numeric_limits::quiet_NaN(); current_statement__ = 1; @@ -5720,11 +5558,7 @@ class indexing_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { local_scalar_t__ alpha = DUMMY_VAR__; current_statement__ = 1; @@ -5891,11 +5725,7 @@ class indexing_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "alpha", "double", @@ -6785,10 +6615,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return indexing_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../../install/default/bin/stanc -fsoa --print-cpp indexing2.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace indexing2_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -6822,19 +6661,11 @@ class indexing2_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "indexing2_model_namespace::indexing2_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 13; context__.validate_dims("data initialization", "N", "int", @@ -6882,15 +6713,9 @@ class indexing2_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "indexing2_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ alpha = DUMMY_VAR__; current_statement__ = 1; @@ -6958,15 +6783,9 @@ class indexing2_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "indexing2_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ alpha = DUMMY_VAR__; current_statement__ = 1; @@ -7040,25 +6859,13 @@ class indexing2_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "indexing2_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { double alpha = std::numeric_limits::quiet_NaN(); current_statement__ = 1; @@ -7093,11 +6900,7 @@ class indexing2_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { local_scalar_t__ alpha = DUMMY_VAR__; current_statement__ = 1; @@ -7121,11 +6924,7 @@ class indexing2_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "alpha", "double", @@ -7302,10 +7101,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return indexing2_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../../install/default/bin/stanc -fsoa --print-cpp reductions_allowed.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace reductions_allowed_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -7344,15 +7152,9 @@ Eigen::Matrix>,-1,-1> nono_func(const T0__& x_arg__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& x = stan::math::to_ref(x_arg__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 8; return x; @@ -7372,15 +7174,9 @@ okay_reduction(const T0__& sum_x, const T1__& y_arg__, std::ostream* using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& y = stan::math::to_ref(y_arg__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 10; return stan::math::add(sum_x, y); @@ -7397,19 +7193,11 @@ class reductions_allowed_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 7; context__.validate_dims("data initialization", "data_r", "double", @@ -7443,15 +7231,9 @@ class reductions_allowed_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "reductions_allowed_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix soa_x = Eigen::Matrix::Constant(5, 10, DUMMY_VAR__); @@ -7509,15 +7291,9 @@ class reductions_allowed_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "reductions_allowed_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { stan::math::var_value> soa_x = stan::math::var_value>(Eigen::Matrix::Constant(5, @@ -7579,25 +7355,13 @@ class reductions_allowed_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "reductions_allowed_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix soa_x = Eigen::Matrix::Constant(5, 10, @@ -7670,11 +7434,7 @@ class reductions_allowed_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { Eigen::Matrix soa_x = Eigen::Matrix::Constant(5, 10, DUMMY_VAR__); @@ -7708,11 +7468,7 @@ class reductions_allowed_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "soa_x", "double", @@ -8000,10 +7756,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return reductions_allowed_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../../install/default/bin/stanc -fsoa --print-cpp return_types_and_udfs_demotes.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace return_types_and_udfs_demotes_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -8032,14 +7797,8 @@ mat_ret_user_func(const T0__& A_arg__, std::ostream* pstream__); Eigen::Matrix empty_user_func(std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { Eigen::Matrix some_mat = Eigen::Matrix::Constant(10, 10, DUMMY_VAR__); @@ -8057,15 +7816,9 @@ Eigen::Matrix>,-1,-1> mat_ret_user_func(const T0__& A_arg__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& A = stan::math::to_ref(A_arg__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 11; return A; @@ -8083,19 +7836,11 @@ class return_types_and_udfs_demotes_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; num_params_r__ = (10 * 10) + (10 * 10); } inline std::string model_name() const final { @@ -8119,15 +7864,9 @@ class return_types_and_udfs_demotes_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "return_types_and_udfs_demotes_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix row_soa = Eigen::Matrix::Constant(10, 10, DUMMY_VAR__); @@ -8190,15 +7929,9 @@ class return_types_and_udfs_demotes_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "return_types_and_udfs_demotes_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { stan::math::var_value> row_soa = stan::math::var_value>(Eigen::Matrix::Constant(10, @@ -8265,25 +7998,13 @@ class return_types_and_udfs_demotes_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "return_types_and_udfs_demotes_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix row_soa = Eigen::Matrix::Constant(10, 10, @@ -8364,11 +8085,7 @@ class return_types_and_udfs_demotes_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { Eigen::Matrix row_soa = Eigen::Matrix::Constant(10, 10, DUMMY_VAR__); @@ -8395,11 +8112,7 @@ class return_types_and_udfs_demotes_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "row_soa", @@ -8695,10 +8408,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return return_types_and_udfs_demotes_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../../install/default/bin/stanc -fsoa --print-cpp single_indexing.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace single_indexing_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -8721,19 +8443,11 @@ class single_indexing_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; num_params_r__ = (10 * 10) + (10 * 10); } inline std::string model_name() const final { @@ -8757,15 +8471,9 @@ class single_indexing_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "single_indexing_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix aos_p = Eigen::Matrix::Constant(10, 10, DUMMY_VAR__); @@ -8821,15 +8529,9 @@ class single_indexing_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "single_indexing_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix aos_p = Eigen::Matrix::Constant(10, 10, DUMMY_VAR__); @@ -8895,25 +8597,13 @@ class single_indexing_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "single_indexing_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix aos_p = Eigen::Matrix::Constant(10, 10, @@ -8979,11 +8669,7 @@ class single_indexing_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { Eigen::Matrix aos_p = Eigen::Matrix::Constant(10, 10, DUMMY_VAR__); @@ -9010,11 +8696,7 @@ class single_indexing_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "aos_p", "double", @@ -9234,10 +8916,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return single_indexing_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../../install/default/bin/stanc -fsoa --print-cpp tp_reused.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace tp_reused_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -9274,15 +8965,9 @@ Eigen::Matrix>,-1,-1> nono_func(const T0__& x_arg__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& x = stan::math::to_ref(x_arg__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 6; return x; @@ -9302,15 +8987,9 @@ okay_reduction(const T0__& sum_x, const T1__& y_arg__, std::ostream* using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& y = stan::math::to_ref(y_arg__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 8; return stan::math::add(sum_x, y); @@ -9327,19 +9006,11 @@ class tp_reused_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "tp_reused_model_namespace::tp_reused_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 5; context__.validate_dims("data initialization", "data_r", "double", @@ -9373,15 +9044,9 @@ class tp_reused_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "tp_reused_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix first_pass_soa_x = Eigen::Matrix::Constant(5, 10, DUMMY_VAR__); @@ -9421,15 +9086,9 @@ class tp_reused_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "tp_reused_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix first_pass_soa_x = Eigen::Matrix::Constant(5, 10, DUMMY_VAR__); @@ -9470,25 +9129,13 @@ class tp_reused_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "tp_reused_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix first_pass_soa_x = Eigen::Matrix::Constant(5, 10, @@ -9538,11 +9185,7 @@ class tp_reused_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { Eigen::Matrix first_pass_soa_x = Eigen::Matrix::Constant(5, 10, DUMMY_VAR__); @@ -9569,11 +9212,7 @@ class tp_reused_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "first_pass_soa_x", @@ -9806,10 +9445,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return tp_reused_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../../install/default/bin/stanc -fsoa --print-cpp tuple_test.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace tuple_test_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -9834,19 +9482,11 @@ class tuple_test_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "tuple_test_model_namespace::tuple_test_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 3; stan::math::validate_non_negative_index("xx.1", "1", 1); @@ -9888,15 +9528,9 @@ class tuple_test_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "tuple_test_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { std::tuple>, Eigen::Matrix, @@ -9945,15 +9579,9 @@ class tuple_test_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "tuple_test_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { std::tuple>, Eigen::Matrix, @@ -10003,25 +9631,13 @@ class tuple_test_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "tuple_test_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { std::tuple>, Eigen::Matrix, Eigen::Matrix> xx = @@ -10091,11 +9707,7 @@ class tuple_test_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { std::tuple>, Eigen::Matrix, @@ -10142,11 +9754,7 @@ class tuple_test_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "xx.1", "double", @@ -10428,10 +10036,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return tuple_test_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../../install/default/bin/stanc -fsoa --print-cpp tuple_test2.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace tuple_test2_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -10453,19 +10070,11 @@ class tuple_test2_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "tuple_test2_model_namespace::tuple_test2_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__ = std::numeric_limits::min(); pos__ = 1; @@ -10515,15 +10124,9 @@ class tuple_test2_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "tuple_test2_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix m1 = Eigen::Matrix::Constant(3, 3, DUMMY_VAR__); @@ -10577,15 +10180,9 @@ class tuple_test2_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "tuple_test2_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix m1 = Eigen::Matrix::Constant(3, 3, DUMMY_VAR__); @@ -10640,25 +10237,13 @@ class tuple_test2_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "tuple_test2_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix m1 = Eigen::Matrix::Constant(3, 3, @@ -10694,11 +10279,7 @@ class tuple_test2_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { Eigen::Matrix m1 = Eigen::Matrix::Constant(3, 3, DUMMY_VAR__); @@ -10725,11 +10306,7 @@ class tuple_test2_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "m1", "double", @@ -10937,3 +10514,6 @@ stan::math::profile_map& get_stan_profile_data() { return tuple_test2_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif diff --git a/test/integration/good/tuples/cpp.expected b/test/integration/good/tuples/cpp.expected index 0289c417d..98bd9e067 100644 --- a/test/integration/good/tuples/cpp.expected +++ b/test/integration/good/tuples/cpp.expected @@ -1,6 +1,12 @@ $ ../../../../../install/default/bin/stanc -fsoa --print-cpp arrays-tuples-nested.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace arrays_tuples_nested_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -51,19 +57,11 @@ class arrays_tuples_nested_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__ = std::numeric_limits::min(); pos__ = 1; @@ -680,15 +678,9 @@ class arrays_tuples_nested_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "arrays_tuples_nested_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { std::tuple, local_scalar_t__> basic_p = std::tuple, local_scalar_t__>{std::vector< @@ -932,15 +924,9 @@ class arrays_tuples_nested_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "arrays_tuples_nested_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { std::tuple, local_scalar_t__> basic_p = std::tuple, local_scalar_t__>{std::vector< @@ -1185,25 +1171,13 @@ class arrays_tuples_nested_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "arrays_tuples_nested_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { std::tuple, double> basic_p = std::tuple, double>{std::vector(10, @@ -1512,11 +1486,7 @@ class arrays_tuples_nested_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { std::tuple, local_scalar_t__> basic_p = std::tuple, local_scalar_t__>{std::vector< @@ -1816,11 +1786,7 @@ class arrays_tuples_nested_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "basic_p.1", @@ -2925,10 +2891,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return arrays_tuples_nested_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc -fsoa --print-cpp basic_unpacking.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace basic_unpacking_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -2958,19 +2933,11 @@ class basic_unpacking_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; x = std::numeric_limits::min(); @@ -3064,15 +3031,9 @@ class basic_unpacking_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "basic_unpacking_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; lp_accum__.add(lp__); return lp_accum__.sum(); } @@ -3090,15 +3051,9 @@ class basic_unpacking_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "basic_unpacking_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; lp_accum__.add(lp__); return lp_accum__.sum(); } @@ -3117,25 +3072,13 @@ class basic_unpacking_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "basic_unpacking_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { if (stan::math::logical_negation( (stan::math::primitive_value(emit_transformed_parameters__) || @@ -3159,11 +3102,7 @@ class basic_unpacking_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } template * = nullptr> inline void @@ -3172,11 +3111,7 @@ class basic_unpacking_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } inline void get_param_names(std::vector& names__, const bool @@ -3309,10 +3244,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return basic_unpacking_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc -fsoa --print-cpp infer_tuple_ad.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace infer_tuple_ad_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -3330,19 +3274,11 @@ class infer_tuple_ad_model final : public model_base_crtp random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "infer_tuple_ad_model_namespace::infer_tuple_ad_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; num_params_r__ = 1; } inline std::string model_name() const final { @@ -3366,15 +3302,9 @@ class infer_tuple_ad_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "infer_tuple_ad_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ x = DUMMY_VAR__; current_statement__ = 1; @@ -3411,15 +3341,9 @@ class infer_tuple_ad_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "infer_tuple_ad_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ x = DUMMY_VAR__; current_statement__ = 1; @@ -3457,25 +3381,13 @@ class infer_tuple_ad_model final : public model_base_crtp stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "infer_tuple_ad_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { double x = std::numeric_limits::quiet_NaN(); current_statement__ = 1; @@ -3503,11 +3415,7 @@ class infer_tuple_ad_model final : public model_base_crtp stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { local_scalar_t__ x = DUMMY_VAR__; current_statement__ = 1; @@ -3524,11 +3432,7 @@ class infer_tuple_ad_model final : public model_base_crtp using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "x", "double", @@ -3674,10 +3578,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return infer_tuple_ad_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc -fsoa --print-cpp nested_unpacking.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace nested_unpacking_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -3703,19 +3616,11 @@ class nested_unpacking_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__ = std::numeric_limits::min(); pos__ = 1; @@ -3787,15 +3692,9 @@ class nested_unpacking_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "nested_unpacking_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { std::vector x = std::vector(3, DUMMY_VAR__); @@ -3850,15 +3749,9 @@ class nested_unpacking_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "nested_unpacking_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { std::vector x = std::vector(3, DUMMY_VAR__); @@ -3914,25 +3807,13 @@ class nested_unpacking_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "nested_unpacking_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { if (stan::math::logical_negation( (stan::math::primitive_value(emit_transformed_parameters__) || @@ -3956,11 +3837,7 @@ class nested_unpacking_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } template * = nullptr> inline void @@ -3969,11 +3846,7 @@ class nested_unpacking_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } inline void get_param_names(std::vector& names__, const bool @@ -4106,10 +3979,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return nested_unpacking_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc -fsoa --print-cpp qr_unpack.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace qr_unpack_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -4140,19 +4022,11 @@ class qr_unpack_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "qr_unpack_model_namespace::qr_unpack_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 11; context__.validate_dims("data initialization", "N", "int", @@ -4200,15 +4074,9 @@ class qr_unpack_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "qr_unpack_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix A = Eigen::Matrix::Constant(N, M, DUMMY_VAR__); @@ -4262,15 +4130,9 @@ class qr_unpack_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "qr_unpack_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix A = Eigen::Matrix::Constant(N, M, DUMMY_VAR__); @@ -4325,25 +4187,13 @@ class qr_unpack_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "qr_unpack_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix A = Eigen::Matrix::Constant(N, M, @@ -4373,11 +4223,7 @@ class qr_unpack_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { Eigen::Matrix A = Eigen::Matrix::Constant(N, M, DUMMY_VAR__); @@ -4397,11 +4243,7 @@ class qr_unpack_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "A", "double", @@ -4574,10 +4416,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return qr_unpack_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc -fsoa --print-cpp simple.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace simple_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -4595,19 +4446,11 @@ class simple_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "simple_model_namespace::simple_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__ = std::numeric_limits::min(); pos__ = 1; @@ -4648,15 +4491,9 @@ class simple_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "simple_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; lp_accum__.add(lp__); return lp_accum__.sum(); } @@ -4674,15 +4511,9 @@ class simple_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "simple_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; lp_accum__.add(lp__); return lp_accum__.sum(); } @@ -4701,25 +4532,13 @@ class simple_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "simple_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { if (stan::math::logical_negation( (stan::math::primitive_value(emit_transformed_parameters__) || @@ -4743,11 +4562,7 @@ class simple_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } template * = nullptr> inline void @@ -4756,11 +4571,7 @@ class simple_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } inline void get_param_names(std::vector& names__, const bool @@ -4893,10 +4704,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return simple_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc -fsoa --print-cpp simple2.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace simple2_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -4914,19 +4734,11 @@ class simple2_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "simple2_model_namespace::simple2_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__ = std::numeric_limits::min(); pos__ = 1; @@ -4972,15 +4784,9 @@ class simple2_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "simple2_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; lp_accum__.add(lp__); return lp_accum__.sum(); } @@ -4998,15 +4804,9 @@ class simple2_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "simple2_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; lp_accum__.add(lp__); return lp_accum__.sum(); } @@ -5025,25 +4825,13 @@ class simple2_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "simple2_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { if (stan::math::logical_negation( (stan::math::primitive_value(emit_transformed_parameters__) || @@ -5067,11 +4855,7 @@ class simple2_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } template * = nullptr> inline void @@ -5080,11 +4864,7 @@ class simple2_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } inline void get_param_names(std::vector& names__, const bool @@ -5217,10 +4997,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return simple2_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc -fsoa --print-cpp simple3.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace simple3_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -5238,19 +5027,11 @@ class simple3_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "simple3_model_namespace::simple3_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__ = std::numeric_limits::min(); pos__ = 1; @@ -5311,15 +5092,9 @@ class simple3_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "simple3_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; lp_accum__.add(lp__); return lp_accum__.sum(); } @@ -5337,15 +5112,9 @@ class simple3_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "simple3_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; lp_accum__.add(lp__); return lp_accum__.sum(); } @@ -5364,25 +5133,13 @@ class simple3_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "simple3_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { if (stan::math::logical_negation( (stan::math::primitive_value(emit_transformed_parameters__) || @@ -5406,11 +5163,7 @@ class simple3_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } template * = nullptr> inline void @@ -5419,11 +5172,7 @@ class simple3_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } inline void get_param_names(std::vector& names__, const bool @@ -5556,10 +5305,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return simple3_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc -fsoa --print-cpp tuple-constraints-data.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace tuple_constraints_data_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -5580,19 +5338,11 @@ class tuple_constraints_data_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__ = std::numeric_limits::min(); pos__ = 1; @@ -5744,15 +5494,9 @@ class tuple_constraints_data_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "tuple_constraints_data_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; lp_accum__.add(lp__); return lp_accum__.sum(); } @@ -5770,15 +5514,9 @@ class tuple_constraints_data_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "tuple_constraints_data_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; lp_accum__.add(lp__); return lp_accum__.sum(); } @@ -5797,25 +5535,13 @@ class tuple_constraints_data_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "tuple_constraints_data_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { if (stan::math::logical_negation( (stan::math::primitive_value(emit_transformed_parameters__) || @@ -5839,11 +5565,7 @@ class tuple_constraints_data_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } template * = nullptr> inline void @@ -5852,11 +5574,7 @@ class tuple_constraints_data_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } inline void get_param_names(std::vector& names__, const bool @@ -5989,10 +5707,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return tuple_constraints_data_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc -fsoa --print-cpp tuple-constraints-params.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace tuple_constraints_params_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -6013,14 +5740,8 @@ std::tuple foo(std::ostream* pstream__); std::tuple foo(std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 8; return std::tuple(1.0, 2.0); @@ -6039,19 +5760,11 @@ class tuple_constraints_params_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 5; context__.validate_dims("data initialization", "indicator", "int", @@ -6103,15 +5816,9 @@ class tuple_constraints_params_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "tuple_constraints_params_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { std::tuple ps = std::tuple{DUMMY_VAR__, @@ -6224,15 +5931,9 @@ class tuple_constraints_params_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "tuple_constraints_params_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { std::tuple ps = std::tuple{DUMMY_VAR__, @@ -6346,25 +6047,13 @@ class tuple_constraints_params_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "tuple_constraints_params_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { std::tuple ps = std::tuple{std::numeric_limits::quiet_NaN(), @@ -6495,11 +6184,7 @@ class tuple_constraints_params_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { std::tuple ps = std::tuple{DUMMY_VAR__, @@ -6625,11 +6310,7 @@ class tuple_constraints_params_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "ps.1", "double", @@ -7136,10 +6817,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return tuple_constraints_params_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc -fsoa --print-cpp tuple-dataonly.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace tuple_dataonly_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -7167,14 +6857,8 @@ baz(const std::vector< double foo(const std::tuple& x, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 5; return std::get<0>(x); @@ -7187,14 +6871,8 @@ double bar(const std::vector>& x, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 7; return std::get<1>(stan::model::rvalue(x, "x", stan::model::index_uni(1))); @@ -7209,14 +6887,8 @@ baz(const std::vector< std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 9; return stan::model::rvalue( @@ -7238,19 +6910,11 @@ class tuple_dataonly_model final : public model_base_crtp random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "tuple_dataonly_model_namespace::tuple_dataonly_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__ = std::numeric_limits::min(); pos__ = 1; @@ -7290,15 +6954,9 @@ class tuple_dataonly_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "tuple_dataonly_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { current_statement__ = 1; lp_accum__.add(foo(d, pstream__)); @@ -7345,15 +7003,9 @@ class tuple_dataonly_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "tuple_dataonly_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { current_statement__ = 1; lp_accum__.add(foo(d, pstream__)); @@ -7401,25 +7053,13 @@ class tuple_dataonly_model final : public model_base_crtp stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "tuple_dataonly_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { if (stan::math::logical_negation( (stan::math::primitive_value(emit_transformed_parameters__) || @@ -7443,11 +7083,7 @@ class tuple_dataonly_model final : public model_base_crtp stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } template * = nullptr> inline void @@ -7456,11 +7092,7 @@ class tuple_dataonly_model final : public model_base_crtp using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } inline void get_param_names(std::vector& names__, const bool @@ -7593,10 +7225,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return tuple_dataonly_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc -fsoa --print-cpp tuple-dataonly2.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace tuple_dataonly2_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -7615,14 +7256,8 @@ tuple_tester(const std::tuple, int>& x, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 2; return stan::model::rvalue(std::get<0>(x), "x.1", @@ -7640,19 +7275,11 @@ class tuple_dataonly2_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; num_params_r__ = 0U; } inline std::string model_name() const final { @@ -7676,15 +7303,9 @@ class tuple_dataonly2_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "tuple_dataonly2_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { current_statement__ = 1; if (pstream__) { @@ -7714,15 +7335,9 @@ class tuple_dataonly2_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "tuple_dataonly2_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { current_statement__ = 1; if (pstream__) { @@ -7753,25 +7368,13 @@ class tuple_dataonly2_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "tuple_dataonly2_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { if (stan::math::logical_negation( (stan::math::primitive_value(emit_transformed_parameters__) || @@ -7795,11 +7398,7 @@ class tuple_dataonly2_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } template * = nullptr> inline void @@ -7808,11 +7407,7 @@ class tuple_dataonly2_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } inline void get_param_names(std::vector& names__, const bool @@ -7945,10 +7540,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return tuple_dataonly2_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc -fsoa --print-cpp tuple-foreach.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace tuple_foreach_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -7966,19 +7570,11 @@ class tuple_foreach_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "tuple_foreach_model_namespace::tuple_foreach_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__ = std::numeric_limits::min(); pos__ = 1; @@ -8019,15 +7615,9 @@ class tuple_foreach_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "tuple_foreach_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; lp_accum__.add(lp__); return lp_accum__.sum(); } @@ -8045,15 +7635,9 @@ class tuple_foreach_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "tuple_foreach_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; lp_accum__.add(lp__); return lp_accum__.sum(); } @@ -8072,25 +7656,13 @@ class tuple_foreach_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "tuple_foreach_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { if (stan::math::logical_negation( (stan::math::primitive_value(emit_transformed_parameters__) || @@ -8114,11 +7686,7 @@ class tuple_foreach_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } template * = nullptr> inline void @@ -8127,11 +7695,7 @@ class tuple_foreach_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } inline void get_param_names(std::vector& names__, const bool @@ -8264,10 +7828,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return tuple_foreach_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc -fsoa --print-cpp tuple-full.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace tuple_full_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -8287,19 +7860,11 @@ class tuple_full_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "tuple_full_model_namespace::tuple_full_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__ = std::numeric_limits::min(); pos__ = 1; @@ -8351,15 +7916,9 @@ class tuple_full_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "tuple_full_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { std::tuple ps = std::tuple{DUMMY_VAR__, @@ -8401,15 +7960,9 @@ class tuple_full_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "tuple_full_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { std::tuple ps = std::tuple{DUMMY_VAR__, @@ -8452,25 +8005,13 @@ class tuple_full_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "tuple_full_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { std::tuple ps = std::tuple{std::numeric_limits::quiet_NaN(), @@ -8505,11 +8046,7 @@ class tuple_full_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { std::tuple ps = std::tuple{DUMMY_VAR__, @@ -8531,11 +8068,7 @@ class tuple_full_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "ps.1", "double", @@ -8696,10 +8229,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return tuple_full_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc -fsoa --print-cpp tuple-ix-assign.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace tuple_ix_assign_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -8717,19 +8259,11 @@ class tuple_ix_assign_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__ = std::numeric_limits::min(); pos__ = 1; @@ -8764,15 +8298,9 @@ class tuple_ix_assign_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "tuple_ix_assign_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; lp_accum__.add(lp__); return lp_accum__.sum(); } @@ -8790,15 +8318,9 @@ class tuple_ix_assign_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "tuple_ix_assign_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; lp_accum__.add(lp__); return lp_accum__.sum(); } @@ -8817,25 +8339,13 @@ class tuple_ix_assign_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "tuple_ix_assign_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { if (stan::math::logical_negation( (stan::math::primitive_value(emit_transformed_parameters__) || @@ -8859,11 +8369,7 @@ class tuple_ix_assign_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } template * = nullptr> inline void @@ -8872,11 +8378,7 @@ class tuple_ix_assign_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } inline void get_param_names(std::vector& names__, const bool @@ -9009,10 +8511,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return tuple_ix_assign_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc -fsoa --print-cpp tuple-ix-assign2.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace tuple_ix_assign2_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -9030,19 +8541,11 @@ class tuple_ix_assign2_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__ = std::numeric_limits::min(); pos__ = 1; @@ -9079,15 +8582,9 @@ class tuple_ix_assign2_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "tuple_ix_assign2_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; lp_accum__.add(lp__); return lp_accum__.sum(); } @@ -9105,15 +8602,9 @@ class tuple_ix_assign2_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "tuple_ix_assign2_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; lp_accum__.add(lp__); return lp_accum__.sum(); } @@ -9132,25 +8623,13 @@ class tuple_ix_assign2_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "tuple_ix_assign2_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { if (stan::math::logical_negation( (stan::math::primitive_value(emit_transformed_parameters__) || @@ -9174,11 +8653,7 @@ class tuple_ix_assign2_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } template * = nullptr> inline void @@ -9187,11 +8662,7 @@ class tuple_ix_assign2_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } inline void get_param_names(std::vector& names__, const bool @@ -9324,10 +8795,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return tuple_ix_assign2_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc -fsoa --print-cpp tuple-ix-assign3.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace tuple_ix_assign3_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -9345,19 +8825,11 @@ class tuple_ix_assign3_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__ = std::numeric_limits::min(); pos__ = 1; @@ -9393,15 +8865,9 @@ class tuple_ix_assign3_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "tuple_ix_assign3_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; lp_accum__.add(lp__); return lp_accum__.sum(); } @@ -9419,15 +8885,9 @@ class tuple_ix_assign3_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "tuple_ix_assign3_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; lp_accum__.add(lp__); return lp_accum__.sum(); } @@ -9446,25 +8906,13 @@ class tuple_ix_assign3_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "tuple_ix_assign3_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { if (stan::math::logical_negation( (stan::math::primitive_value(emit_transformed_parameters__) || @@ -9488,11 +8936,7 @@ class tuple_ix_assign3_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } template * = nullptr> inline void @@ -9501,11 +8945,7 @@ class tuple_ix_assign3_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } inline void get_param_names(std::vector& names__, const bool @@ -9638,10 +9078,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return tuple_ix_assign3_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc -fsoa --print-cpp tuple-ix-assign4.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace tuple_ix_assign4_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -9659,19 +9108,11 @@ class tuple_ix_assign4_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__ = std::numeric_limits::min(); pos__ = 1; @@ -9711,15 +9152,9 @@ class tuple_ix_assign4_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "tuple_ix_assign4_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; lp_accum__.add(lp__); return lp_accum__.sum(); } @@ -9737,15 +9172,9 @@ class tuple_ix_assign4_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "tuple_ix_assign4_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; lp_accum__.add(lp__); return lp_accum__.sum(); } @@ -9764,25 +9193,13 @@ class tuple_ix_assign4_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "tuple_ix_assign4_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { if (stan::math::logical_negation( (stan::math::primitive_value(emit_transformed_parameters__) || @@ -9806,11 +9223,7 @@ class tuple_ix_assign4_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } template * = nullptr> inline void @@ -9819,11 +9232,7 @@ class tuple_ix_assign4_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } inline void get_param_names(std::vector& names__, const bool @@ -9956,10 +9365,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return tuple_ix_assign4_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc -fsoa --print-cpp tuple-nested-param.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace tuple_nested_param_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -9977,19 +9395,11 @@ class tuple_nested_param_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; num_params_r__ = (1 + 1) + (1 + (1 + (10 * 10))); } inline std::string model_name() const final { @@ -10013,15 +9423,9 @@ class tuple_nested_param_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "tuple_nested_param_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { std::tuple ps = std::tuple{DUMMY_VAR__, @@ -10066,15 +9470,9 @@ class tuple_nested_param_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "tuple_nested_param_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { std::tuple ps = std::tuple{DUMMY_VAR__, @@ -10120,25 +9518,13 @@ class tuple_nested_param_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "tuple_nested_param_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { std::tuple ps = std::tuple{std::numeric_limits::quiet_NaN(), @@ -10190,11 +9576,7 @@ class tuple_nested_param_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { std::tuple ps = std::tuple{DUMMY_VAR__, @@ -10235,11 +9617,7 @@ class tuple_nested_param_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "ps.1", "double", @@ -10462,10 +9840,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return tuple_nested_param_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc -fsoa --print-cpp tuple-params.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace tuple_params_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -10482,19 +9869,11 @@ class tuple_params_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "tuple_params_model_namespace::tuple_params_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; num_params_r__ = (1 + 1); } inline std::string model_name() const final { @@ -10518,15 +9897,9 @@ class tuple_params_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "tuple_params_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { std::tuple ps = std::tuple{DUMMY_VAR__, @@ -10556,15 +9929,9 @@ class tuple_params_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "tuple_params_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { std::tuple ps = std::tuple{DUMMY_VAR__, @@ -10595,25 +9962,13 @@ class tuple_params_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "tuple_params_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { std::tuple ps = std::tuple{std::numeric_limits::quiet_NaN(), @@ -10647,11 +10002,7 @@ class tuple_params_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { std::tuple ps = std::tuple{DUMMY_VAR__, @@ -10673,11 +10024,7 @@ class tuple_params_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "ps.1", "double", @@ -10838,10 +10185,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return tuple_params_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc -fsoa --print-cpp tuple-promotion.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace tuple_promotion_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -10899,14 +10255,8 @@ dummy(const std::tuple& test, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t, stan::base_type_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 20; return (stan::math::sum(std::get<0>(test)) + @@ -10933,19 +10283,11 @@ class tuple_promotion_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__ = std::numeric_limits::min(); pos__ = 1; @@ -11066,15 +10408,9 @@ class tuple_promotion_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "tuple_promotion_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { std::tuple>, std::vector>> d2 = @@ -11186,15 +10522,9 @@ class tuple_promotion_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "tuple_promotion_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { std::tuple>, std::vector>> d2 = @@ -11307,25 +10637,13 @@ class tuple_promotion_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "tuple_promotion_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { std::tuple>, std::vector>> d2 = @@ -11517,11 +10835,7 @@ class tuple_promotion_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } template * = nullptr> inline void @@ -11530,11 +10844,7 @@ class tuple_promotion_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } inline void get_param_names(std::vector& names__, const bool @@ -11892,10 +11202,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return tuple_promotion_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc -fsoa --print-cpp tuple-templating.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace tuple_templating_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -11982,14 +11301,8 @@ template & test, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 17; if (pstream__) { @@ -12013,14 +11326,8 @@ stan::promote_args_t> tsum(const std::tuple& s, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 19; return stan::math::sum(std::get<1>(s)); @@ -12038,14 +11345,8 @@ foo2(const std::vector>& test, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 21; if (pstream__) { @@ -12068,14 +11369,8 @@ void foo3(const std::tuple& test, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 23; if (pstream__) { @@ -12112,14 +11407,8 @@ overly_complicated(const std::tuple, T0__2__, stan::base_type_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 25; if (pstream__) { @@ -12145,19 +11434,11 @@ class tuple_templating_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__ = std::numeric_limits::min(); pos__ = 1; @@ -12259,15 +11540,9 @@ class tuple_templating_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "tuple_templating_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; lp_accum__.add(lp__); return lp_accum__.sum(); } @@ -12285,15 +11560,9 @@ class tuple_templating_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "tuple_templating_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; lp_accum__.add(lp__); return lp_accum__.sum(); } @@ -12312,25 +11581,13 @@ class tuple_templating_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "tuple_templating_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { if (stan::math::logical_negation( (stan::math::primitive_value(emit_transformed_parameters__) || @@ -12400,11 +11657,7 @@ class tuple_templating_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } template * = nullptr> inline void @@ -12413,11 +11666,7 @@ class tuple_templating_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } inline void get_param_names(std::vector& names__, const bool @@ -12562,10 +11811,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return tuple_templating_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc -fsoa --print-cpp tuple_copying.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace tuple_copying_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -12637,14 +11895,8 @@ void f(const std::tuple& x, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t, stan::base_type_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 15; if (pstream__) { @@ -12675,14 +11927,8 @@ g(const std::tuple& x, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t, stan::base_type_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 18; if (pstream__) { @@ -12721,14 +11967,8 @@ h(const std::tuple>& x, stan::base_type_t, stan::base_type_t>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 22; if (pstream__) { @@ -12761,19 +12001,11 @@ class tuple_copying_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "tuple_copying_model_namespace::tuple_copying_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__ = std::numeric_limits::min(); pos__ = 1; @@ -12837,15 +12069,9 @@ class tuple_copying_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "tuple_copying_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix m1 = Eigen::Matrix::Constant(3, 3, DUMMY_VAR__); @@ -12943,15 +12169,9 @@ class tuple_copying_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "tuple_copying_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix m1 = Eigen::Matrix::Constant(3, 3, DUMMY_VAR__); @@ -13050,25 +12270,13 @@ class tuple_copying_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "tuple_copying_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { Eigen::Matrix m1 = Eigen::Matrix::Constant(3, 3, @@ -13104,11 +12312,7 @@ class tuple_copying_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { Eigen::Matrix m1 = Eigen::Matrix::Constant(3, 3, DUMMY_VAR__); @@ -13135,11 +12339,7 @@ class tuple_copying_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "m1", "double", @@ -13346,10 +12546,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return tuple_copying_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc -fsoa --print-cpp tuple_exprs.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace tuple_exprs_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -13372,19 +12581,11 @@ class tuple_exprs_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "tuple_exprs_model_namespace::tuple_exprs_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; num_params_r__ = 0U; } inline std::string model_name() const final { @@ -13408,15 +12609,9 @@ class tuple_exprs_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "tuple_exprs_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; lp_accum__.add(lp__); return lp_accum__.sum(); } @@ -13434,15 +12629,9 @@ class tuple_exprs_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "tuple_exprs_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; lp_accum__.add(lp__); return lp_accum__.sum(); } @@ -13461,25 +12650,13 @@ class tuple_exprs_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "tuple_exprs_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { if (stan::math::logical_negation( (stan::math::primitive_value(emit_transformed_parameters__) || @@ -13541,11 +12718,7 @@ class tuple_exprs_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } template * = nullptr> inline void @@ -13554,11 +12727,7 @@ class tuple_exprs_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } inline void get_param_names(std::vector& names__, const bool @@ -13727,10 +12896,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return tuple_exprs_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc -fsoa --print-cpp tuple_hof.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace tuple_hof_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -13802,14 +12980,8 @@ fun(const T0__& y_slice, const T1__& start, const T2__& end, using local_scalar_t__ = stan::promote_args_t, T3__0__>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 10; return (stan::math::sum(y_slice) * std::get<0>(m)); @@ -13829,19 +13001,11 @@ class tuple_hof_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "tuple_hof_model_namespace::tuple_hof_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__ = std::numeric_limits::min(); pos__ = 1; @@ -13906,15 +13070,9 @@ class tuple_hof_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "tuple_hof_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { std::vector param_y = std::vector(N, DUMMY_VAR__); @@ -13944,15 +13102,9 @@ class tuple_hof_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "tuple_hof_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { std::vector param_y = std::vector(N, DUMMY_VAR__); @@ -13983,25 +13135,13 @@ class tuple_hof_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "tuple_hof_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { std::vector param_y = std::vector(N, std::numeric_limits::quiet_NaN()); @@ -14037,11 +13177,7 @@ class tuple_hof_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { std::vector param_y = std::vector(N, DUMMY_VAR__); @@ -14061,11 +13197,7 @@ class tuple_hof_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "param_y", @@ -14231,10 +13363,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return tuple_hof_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc -fsoa --print-cpp tuple_lpdf.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace tuple_lpdf_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -14280,11 +13421,7 @@ foo_lpdf(const std::tuple& x, using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 2; return 0; @@ -14301,19 +13438,11 @@ class tuple_lpdf_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "tuple_lpdf_model_namespace::tuple_lpdf_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; num_params_r__ = 0U; } inline std::string model_name() const final { @@ -14337,15 +13466,9 @@ class tuple_lpdf_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "tuple_lpdf_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { current_statement__ = 1; lp_accum__.add(foo_lpdf(std::tuple(1.5, 2), @@ -14371,15 +13494,9 @@ class tuple_lpdf_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "tuple_lpdf_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { current_statement__ = 1; lp_accum__.add(foo_lpdf(std::tuple(1.5, 2), @@ -14406,25 +13523,13 @@ class tuple_lpdf_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "tuple_lpdf_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { if (stan::math::logical_negation( (stan::math::primitive_value(emit_transformed_parameters__) || @@ -14448,11 +13553,7 @@ class tuple_lpdf_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } template * = nullptr> inline void @@ -14461,11 +13562,7 @@ class tuple_lpdf_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } inline void get_param_names(std::vector& names__, const bool @@ -14598,10 +13695,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return tuple_lpdf_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc -fsoa --print-cpp tuple_lpdf2.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace tuple_lpdf2_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -14626,11 +13732,7 @@ stan::promote_args_t foo_lpdf(const std::tuple& x, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 2; return 0; @@ -14647,19 +13749,11 @@ class tuple_lpdf2_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "tuple_lpdf2_model_namespace::tuple_lpdf2_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; num_params_r__ = 0U; } inline std::string model_name() const final { @@ -14683,15 +13777,9 @@ class tuple_lpdf2_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "tuple_lpdf2_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { current_statement__ = 1; lp_accum__.add(foo_lpdf(std::tuple(1.5, 2), @@ -14716,15 +13804,9 @@ class tuple_lpdf2_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "tuple_lpdf2_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { current_statement__ = 1; lp_accum__.add(foo_lpdf(std::tuple(1.5, 2), @@ -14750,25 +13832,13 @@ class tuple_lpdf2_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "tuple_lpdf2_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { if (stan::math::logical_negation( (stan::math::primitive_value(emit_transformed_parameters__) || @@ -14792,11 +13862,7 @@ class tuple_lpdf2_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } template * = nullptr> inline void @@ -14805,11 +13871,7 @@ class tuple_lpdf2_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } inline void get_param_names(std::vector& names__, const bool @@ -14942,10 +14004,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return tuple_lpdf2_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc -fsoa --print-cpp tuple_lpmf.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace tuple_lpmf_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -14974,11 +14045,7 @@ foo_lpmf(const std::tuple& x, const T1__& y, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 2; return (std::get<0>(x) + (std::get<1>(x) * y)); @@ -14995,19 +14062,11 @@ class tuple_lpmf_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "tuple_lpmf_model_namespace::tuple_lpmf_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; num_params_r__ = 0U; } inline std::string model_name() const final { @@ -15031,15 +14090,9 @@ class tuple_lpmf_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "tuple_lpmf_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { current_statement__ = 1; lp_accum__.add(foo_lpmf(std::tuple(1, 3), 0.5, @@ -15064,15 +14117,9 @@ class tuple_lpmf_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "tuple_lpmf_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { current_statement__ = 1; lp_accum__.add(foo_lpmf(std::tuple(1, 3), 0.5, @@ -15098,25 +14145,13 @@ class tuple_lpmf_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "tuple_lpmf_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { if (stan::math::logical_negation( (stan::math::primitive_value(emit_transformed_parameters__) || @@ -15140,11 +14175,7 @@ class tuple_lpmf_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } template * = nullptr> inline void @@ -15153,11 +14184,7 @@ class tuple_lpmf_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } inline void get_param_names(std::vector& names__, const bool @@ -15290,10 +14317,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return tuple_lpmf_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc -fsoa --print-cpp tuple_temporary.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace tuple_temporary_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -15318,19 +14354,11 @@ class tuple_temporary_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 4; stan::math::validate_non_negative_index("m", "1", 1); @@ -15370,15 +14398,9 @@ class tuple_temporary_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "tuple_temporary_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; lp_accum__.add(lp__); return lp_accum__.sum(); } @@ -15396,15 +14418,9 @@ class tuple_temporary_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "tuple_temporary_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; lp_accum__.add(lp__); return lp_accum__.sum(); } @@ -15423,25 +14439,13 @@ class tuple_temporary_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "tuple_temporary_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { if (stan::math::logical_negation( (stan::math::primitive_value(emit_transformed_parameters__) || @@ -15497,11 +14501,7 @@ class tuple_temporary_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } template * = nullptr> inline void @@ -15510,11 +14510,7 @@ class tuple_temporary_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; } inline void get_param_names(std::vector& names__, const bool @@ -15713,10 +14709,19 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return tuple_temporary_model_namespace::profiles__; } +#endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop #endif $ ../../../../../install/default/bin/stanc -fsoa --print-cpp unpack_promote.stan // Code generated by %%NAME%% %%VERSION%% #include +#ifndef _MSC_VER +// Disable warnings for unused variables in our generated code. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace unpack_promote_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -15768,19 +14773,11 @@ class unpack_promote_model final : public model_base_crtp random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; using local_scalar_t__ = double; auto base_rng__ = stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; static constexpr const char* function__ = "unpack_promote_model_namespace::unpack_promote_model"; - // suppress unused var warning - (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__ = std::numeric_limits::min(); pos__ = 1; @@ -15864,15 +14861,9 @@ class unpack_promote_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "unpack_promote_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { std::vector alpha = std::vector(N, DUMMY_VAR__); @@ -16019,15 +15010,9 @@ class unpack_promote_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; static constexpr const char* function__ = "unpack_promote_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { std::vector alpha = std::vector(N, DUMMY_VAR__); @@ -16175,25 +15160,13 @@ class unpack_promote_model final : public model_base_crtp stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; double lp__ = 0.0; - // suppress unused var warning - (void) lp__; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; constexpr bool jacobian__ = false; - // suppress unused var warning - (void) jacobian__; static constexpr const char* function__ = "unpack_promote_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { std::vector alpha = std::vector(N, std::numeric_limits::quiet_NaN()); @@ -16228,11 +15201,7 @@ class unpack_promote_model final : public model_base_crtp stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { std::vector alpha = std::vector(N, DUMMY_VAR__); @@ -16258,11 +15227,7 @@ class unpack_promote_model final : public model_base_crtp using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; context__.validate_dims("parameter initialization", "alpha", "double", @@ -16445,3 +15410,6 @@ stan::math::profile_map& get_stan_profile_data() { return unpack_promote_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif From a0ad96bcb720cd958a6c05780e0e69527a559c4d Mon Sep 17 00:00:00 2001 From: Brian Ward Date: Tue, 7 May 2024 11:06:56 -0400 Subject: [PATCH 2/2] Disable warning about unknown warning flag on older compilers --- src/stan_math_backend/Lower_program.ml | 2 + .../cli-args/allow-undefined/cpp.expected | 1 + .../allow-undefined/standalone-cpp.expected | 1 + .../filename-in-msg/filename_good.expected | 1 + test/integration/good/code-gen/cl.expected | 1 + .../code-gen/complex_numbers/cpp.expected | 7 +++ test/integration/good/code-gen/cpp.expected | 35 +++++++++++++++ .../good/code-gen/expressions/cpp.expected | 3 ++ test/integration/good/code-gen/lir.expected | 1 + .../good/code-gen/ode/cpp.expected | 2 + .../good/code-gen/opencl/cpp.expected | 2 + .../good/code-gen/profiling/cpp.expected | 1 + .../standalone_functions/cpp.expected | 3 ++ .../good/compiler-optimizations/cpp.expected | 43 +++++++++++++++++++ .../compiler-optimizations/cppO0.expected | 43 +++++++++++++++++++ .../compiler-optimizations/cppO1.expected | 43 +++++++++++++++++++ .../mem_patterns/cpp.expected | 12 ++++++ test/integration/good/tuples/cpp.expected | 30 +++++++++++++ 18 files changed, 231 insertions(+) diff --git a/src/stan_math_backend/Lower_program.ml b/src/stan_math_backend/Lower_program.ml index cb73ae59d..aaee5e312 100644 --- a/src/stan_math_backend/Lower_program.ml +++ b/src/stan_math_backend/Lower_program.ml @@ -35,6 +35,8 @@ let prevent_unused = [ GlobalComment "Disable warnings for unused variables in our generated code." ; Preprocessor (Pragma "GCC diagnostic push") + ; Preprocessor + (Pragma {|GCC diagnostic ignored "-Wunknown-warning-option"|}) ; Preprocessor (Pragma {|GCC diagnostic ignored "-Wunused-but-set-variable"|}) ; Preprocessor (Pragma {|GCC diagnostic ignored "-Wunused-variable"|}) ] diff --git a/test/integration/cli-args/allow-undefined/cpp.expected b/test/integration/cli-args/allow-undefined/cpp.expected index f93ecbd28..ddbd17e82 100644 --- a/test/integration/cli-args/allow-undefined/cpp.expected +++ b/test/integration/cli-args/allow-undefined/cpp.expected @@ -4,6 +4,7 @@ #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif diff --git a/test/integration/cli-args/allow-undefined/standalone-cpp.expected b/test/integration/cli-args/allow-undefined/standalone-cpp.expected index 53f6bb3ae..e8d992177 100644 --- a/test/integration/cli-args/allow-undefined/standalone-cpp.expected +++ b/test/integration/cli-args/allow-undefined/standalone-cpp.expected @@ -4,6 +4,7 @@ #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif diff --git a/test/integration/cli-args/filename-in-msg/filename_good.expected b/test/integration/cli-args/filename-in-msg/filename_good.expected index bef471c8b..bb7d74c6f 100644 --- a/test/integration/cli-args/filename-in-msg/filename_good.expected +++ b/test/integration/cli-args/filename-in-msg/filename_good.expected @@ -4,6 +4,7 @@ #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif diff --git a/test/integration/good/code-gen/cl.expected b/test/integration/good/code-gen/cl.expected index 94ee08469..a654125aa 100644 --- a/test/integration/good/code-gen/cl.expected +++ b/test/integration/good/code-gen/cl.expected @@ -4,6 +4,7 @@ #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif diff --git a/test/integration/good/code-gen/complex_numbers/cpp.expected b/test/integration/good/code-gen/complex_numbers/cpp.expected index 48d5b7847..2e250559a 100644 --- a/test/integration/good/code-gen/complex_numbers/cpp.expected +++ b/test/integration/good/code-gen/complex_numbers/cpp.expected @@ -4,6 +4,7 @@ #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -2400,6 +2401,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -3555,6 +3557,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -6420,6 +6423,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -6959,6 +6963,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -9934,6 +9939,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -10495,6 +10501,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif diff --git a/test/integration/good/code-gen/cpp.expected b/test/integration/good/code-gen/cpp.expected index 95a57e4d2..570168eb5 100644 --- a/test/integration/good/code-gen/cpp.expected +++ b/test/integration/good/code-gen/cpp.expected @@ -4,6 +4,7 @@ #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -504,6 +505,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -824,6 +826,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -1227,6 +1230,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -1914,6 +1918,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -2993,6 +2998,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -3618,6 +3624,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -3924,6 +3931,7 @@ Warning in 'double-reject.stan', line 4, column 2: Unreachable statement #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -4424,6 +4432,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -4802,6 +4811,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -5283,6 +5293,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -15287,6 +15298,7 @@ STAN_REGISTER_MAP_RECT(2, mother_model_namespace::binomialf_functor__) #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -17817,6 +17829,7 @@ Warning in 'motherHOF.stan', line 189, column 10: integrate_ode_rk45 is #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -23915,6 +23928,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -24742,6 +24756,7 @@ Warning in 'old_integrate_interface.stan', line 36, column 23: integrate_ode_bdf #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -26853,6 +26868,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -27613,6 +27629,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -28088,6 +28105,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -28374,6 +28392,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -28759,6 +28778,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -29538,6 +29558,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -30167,6 +30188,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -33220,6 +33242,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -37701,6 +37724,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -38090,6 +38114,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -38513,6 +38538,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -38858,6 +38884,7 @@ Warning in 'self-assign.stan', line 12, column 4: Assignment of variable to #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -40345,6 +40372,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -40745,6 +40773,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -41125,6 +41154,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -44305,6 +44335,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -44841,6 +44872,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -45181,6 +45213,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -45530,6 +45563,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -45915,6 +45949,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif diff --git a/test/integration/good/code-gen/expressions/cpp.expected b/test/integration/good/code-gen/expressions/cpp.expected index e44014e5f..79b0bdbc2 100644 --- a/test/integration/good/code-gen/expressions/cpp.expected +++ b/test/integration/good/code-gen/expressions/cpp.expected @@ -4,6 +4,7 @@ #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -557,6 +558,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -1038,6 +1040,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif diff --git a/test/integration/good/code-gen/lir.expected b/test/integration/good/code-gen/lir.expected index a0e85ab2d..ac672277a 100644 --- a/test/integration/good/code-gen/lir.expected +++ b/test/integration/good/code-gen/lir.expected @@ -5,6 +5,7 @@ (IfNDef _MSC_VER ((GlobalComment "Disable warnings for unused variables in our generated code.") (Preprocessor (Pragma "GCC diagnostic push")) + (Preprocessor (Pragma "GCC diagnostic ignored \"-Wunknown-warning-option\"")) (Preprocessor (Pragma "GCC diagnostic ignored \"-Wunused-but-set-variable\"")) (Preprocessor (Pragma "GCC diagnostic ignored \"-Wunused-variable\""))))) (Namespace mother_model_namespace diff --git a/test/integration/good/code-gen/ode/cpp.expected b/test/integration/good/code-gen/ode/cpp.expected index f9132b976..203b62d50 100644 --- a/test/integration/good/code-gen/ode/cpp.expected +++ b/test/integration/good/code-gen/ode/cpp.expected @@ -4,6 +4,7 @@ #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -786,6 +787,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif diff --git a/test/integration/good/code-gen/opencl/cpp.expected b/test/integration/good/code-gen/opencl/cpp.expected index 04f44c976..9cf1a8a31 100644 --- a/test/integration/good/code-gen/opencl/cpp.expected +++ b/test/integration/good/code-gen/opencl/cpp.expected @@ -4,6 +4,7 @@ #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -10421,6 +10422,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif diff --git a/test/integration/good/code-gen/profiling/cpp.expected b/test/integration/good/code-gen/profiling/cpp.expected index c2881b779..9d1879fb7 100644 --- a/test/integration/good/code-gen/profiling/cpp.expected +++ b/test/integration/good/code-gen/profiling/cpp.expected @@ -4,6 +4,7 @@ #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif diff --git a/test/integration/good/code-gen/standalone_functions/cpp.expected b/test/integration/good/code-gen/standalone_functions/cpp.expected index 7d9ea81e5..2b9537601 100644 --- a/test/integration/good/code-gen/standalone_functions/cpp.expected +++ b/test/integration/good/code-gen/standalone_functions/cpp.expected @@ -4,6 +4,7 @@ #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -399,6 +400,7 @@ array_fun(const std::vector>>>& #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -701,6 +703,7 @@ test_lpdf(const double& a, const double& b, std::ostream* pstream__ = nullptr) { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif diff --git a/test/integration/good/compiler-optimizations/cpp.expected b/test/integration/good/compiler-optimizations/cpp.expected index 0c12c7570..c50bf9d0b 100644 --- a/test/integration/good/compiler-optimizations/cpp.expected +++ b/test/integration/good/compiler-optimizations/cpp.expected @@ -4,6 +4,7 @@ #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -1841,6 +1842,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -2726,6 +2728,7 @@ Warning in 'ad-level-failing.stan', line 46, column 8: integrate_ode_rk45 is #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -4385,6 +4388,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -4854,6 +4858,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -6874,6 +6879,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -8384,6 +8390,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -8696,6 +8703,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -9005,6 +9013,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -9573,6 +9582,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -10007,6 +10017,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -11449,6 +11460,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -12260,6 +12272,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -14265,6 +14278,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -18382,6 +18396,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -19601,6 +19616,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -20317,6 +20333,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -22337,6 +22354,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -22775,6 +22793,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -23284,6 +23303,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -23612,6 +23632,7 @@ Warning in 'fuzz-div0.stan', line 2, column 41: Found int division: #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -24259,6 +24280,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -24910,6 +24932,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -25296,6 +25319,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -25720,6 +25744,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -29831,6 +29856,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -30139,6 +30165,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -30490,6 +30517,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -30851,6 +30879,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -32702,6 +32731,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -33214,6 +33244,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -34181,6 +34212,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -35162,6 +35194,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -36856,6 +36889,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -37193,6 +37227,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -37561,6 +37596,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -37910,6 +37946,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -38749,6 +38786,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -41658,6 +41696,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -41967,6 +42006,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -42985,6 +43025,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -43661,6 +43702,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -44195,6 +44237,7 @@ Warning in 'unenforce-initialize.stan', line 8, column 2: Assignment of #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif diff --git a/test/integration/good/compiler-optimizations/cppO0.expected b/test/integration/good/compiler-optimizations/cppO0.expected index d94ae5427..5c6f146b8 100644 --- a/test/integration/good/compiler-optimizations/cppO0.expected +++ b/test/integration/good/compiler-optimizations/cppO0.expected @@ -4,6 +4,7 @@ #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -623,6 +624,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -1409,6 +1411,7 @@ Warning in 'ad-level-failing.stan', line 46, column 8: integrate_ode_rk45 is #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -1867,6 +1870,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -2321,6 +2325,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -3331,6 +3336,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -4587,6 +4593,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -4897,6 +4904,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -5203,6 +5211,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -5706,6 +5715,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -6135,6 +6145,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -7302,6 +7313,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -8041,6 +8053,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -9103,6 +9116,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -10790,6 +10804,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -11537,6 +11552,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -12217,6 +12233,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -13227,6 +13244,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -13591,6 +13609,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -13983,6 +14002,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -14311,6 +14331,7 @@ Warning in 'fuzz-div0.stan', line 2, column 41: Found int division: #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -14789,6 +14810,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -15317,6 +15339,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -15693,6 +15716,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -16079,6 +16103,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -17683,6 +17708,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -17990,6 +18016,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -18340,6 +18367,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -18698,6 +18726,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -19621,6 +19650,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -20078,6 +20108,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -20853,6 +20884,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -21703,6 +21735,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -22908,6 +22941,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -23231,6 +23265,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -23580,6 +23615,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -23929,6 +23965,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -24646,6 +24683,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -25179,6 +25217,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -25484,6 +25523,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -26189,6 +26229,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -26610,6 +26651,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -27036,6 +27078,7 @@ Warning in 'unenforce-initialize.stan', line 8, column 2: Assignment of #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif diff --git a/test/integration/good/compiler-optimizations/cppO1.expected b/test/integration/good/compiler-optimizations/cppO1.expected index 69af2ea0a..1c07abfa1 100644 --- a/test/integration/good/compiler-optimizations/cppO1.expected +++ b/test/integration/good/compiler-optimizations/cppO1.expected @@ -4,6 +4,7 @@ #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -605,6 +606,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -1391,6 +1393,7 @@ Warning in 'ad-level-failing.stan', line 46, column 8: integrate_ode_rk45 is #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -1841,6 +1844,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -2285,6 +2289,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -3465,6 +3470,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -4701,6 +4707,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -5011,6 +5018,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -5317,6 +5325,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -5811,6 +5820,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -6236,6 +6246,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -7400,6 +7411,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -8134,6 +8146,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -9368,6 +9381,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -11744,6 +11758,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -12473,6 +12488,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -13146,6 +13162,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -14326,6 +14343,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -14708,6 +14726,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -15149,6 +15168,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -15474,6 +15494,7 @@ Warning in 'fuzz-div0.stan', line 2, column 41: Found int division: #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -15939,6 +15960,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -16527,6 +16549,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -16904,6 +16927,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -17328,6 +17352,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -19658,6 +19683,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -19965,6 +19991,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -20313,6 +20340,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -20667,6 +20695,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -21765,6 +21794,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -22286,6 +22316,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -23053,6 +23084,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -23899,6 +23931,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -25118,6 +25151,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -25441,6 +25475,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -25792,6 +25827,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -26135,6 +26171,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -26849,6 +26886,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -27358,6 +27396,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -27663,6 +27702,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -28368,6 +28408,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -28785,6 +28826,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -29207,6 +29249,7 @@ Warning in 'unenforce-initialize.stan', line 8, column 2: Assignment of #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif diff --git a/test/integration/good/compiler-optimizations/mem_patterns/cpp.expected b/test/integration/good/compiler-optimizations/mem_patterns/cpp.expected index f1c5f41ab..6a66c4576 100644 --- a/test/integration/good/compiler-optimizations/mem_patterns/cpp.expected +++ b/test/integration/good/compiler-optimizations/mem_patterns/cpp.expected @@ -4,6 +4,7 @@ #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -765,6 +766,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -1166,6 +1168,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -3461,6 +3464,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -4087,6 +4091,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -6625,6 +6630,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -7111,6 +7117,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -7766,6 +7773,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -8418,6 +8426,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -8926,6 +8935,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -9455,6 +9465,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -10046,6 +10057,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif diff --git a/test/integration/good/tuples/cpp.expected b/test/integration/good/tuples/cpp.expected index 98bd9e067..7f14f2792 100644 --- a/test/integration/good/tuples/cpp.expected +++ b/test/integration/good/tuples/cpp.expected @@ -4,6 +4,7 @@ #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -2901,6 +2902,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -3254,6 +3256,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -3588,6 +3591,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -3989,6 +3993,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -4426,6 +4431,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -4714,6 +4720,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -5007,6 +5014,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -5315,6 +5323,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -5717,6 +5726,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -6827,6 +6837,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -7235,6 +7246,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -7550,6 +7562,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -7838,6 +7851,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -8239,6 +8253,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -8521,6 +8536,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -8805,6 +8821,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -9088,6 +9105,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -9375,6 +9393,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -9850,6 +9869,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -10195,6 +10215,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -11212,6 +11233,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -11821,6 +11843,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -12556,6 +12579,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -12906,6 +12930,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -13373,6 +13398,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -13705,6 +13731,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -14014,6 +14041,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -14327,6 +14355,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -14719,6 +14748,7 @@ stan::math::profile_map& get_stan_profile_data() { #ifndef _MSC_VER // Disable warnings for unused variables in our generated code. #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" #endif