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 67863dd71..5342f6cc3 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 | FnJacobian -> [] | 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 @@ -328,7 +327,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) @@ -465,16 +464,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) { @@ -538,17 +531,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..aaee5e312 100644 --- a/src/stan_math_backend/Lower_program.ml +++ b/src/stan_math_backend/Lower_program.ml @@ -20,18 +20,30 @@ 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 "-Wunknown-warning-option"|}) + ; 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 +168,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 +225,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 +273,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 +297,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 +332,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 +831,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 +894,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 c084cb03c..211c2f279 100644 --- a/test/integration/cli-args/allow-undefined/cpp.expected +++ b/test/integration/cli-args/allow-undefined/cpp.expected @@ -1,6 +1,13 @@ $ ../../../../../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 "-Wunknown-warning-option" +#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 +38,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 +60,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 +88,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 +108,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 +129,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 +159,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 +168,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 +303,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 927c12e60..be246e6d7 100644 --- a/test/integration/cli-args/allow-undefined/standalone-cpp.expected +++ b/test/integration/cli-args/allow-undefined/standalone-cpp.expected @@ -1,6 +1,13 @@ $ ../../../../../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 "-Wunknown-warning-option" +#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 +38,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 +72,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 cfbd886b6..b9690361a 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,13 @@ $ ../../../../../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 "-Wunknown-warning-option" +#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 +26,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 +64,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 +84,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 +105,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 +135,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 +144,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,4 +278,7 @@ stan::math::profile_map& get_stan_profile_data() { return filename_good_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] diff --git a/test/integration/good/code-gen/cl.expected b/test/integration/good/code-gen/cl.expected index cb770c1d8..796be8578 100644 --- a/test/integration/good/code-gen/cl.expected +++ b/test/integration/good/code-gen/cl.expected @@ -1,6 +1,13 @@ $ ../../../../../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 "-Wunknown-warning-option" +#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 +269,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 +505,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 { current_statement__ = 1; auto alpha_v = @@ -1212,15 +1205,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 { current_statement__ = 1; auto alpha_v = @@ -1919,25 +1906,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 { current_statement__ = 1; auto alpha_v = @@ -1994,11 +1969,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__); @@ -2065,11 +2036,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", @@ -2413,4 +2380,7 @@ stan::math::profile_map& get_stan_profile_data() { return optimize_glm_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] diff --git a/test/integration/good/code-gen/complex_numbers/cpp.expected b/test/integration/good/code-gen/complex_numbers/cpp.expected index 01edc23c1..85fc16c14 100644 --- a/test/integration/good/code-gen/complex_numbers/cpp.expected +++ b/test/integration/good/code-gen/complex_numbers/cpp.expected @@ -1,6 +1,13 @@ $ ../../../../../../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 "-Wunknown-warning-option" +#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 +162,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 +229,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 { current_statement__ = 1; auto cmat = @@ -758,15 +751,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 { current_statement__ = 1; auto cmat = @@ -1287,25 +1274,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 { current_statement__ = 1; auto cmat = @@ -1852,11 +1827,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, @@ -1923,11 +1894,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", @@ -2379,10 +2346,20 @@ stan::math::profile_map& get_stan_profile_data() { return basic_op_param_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../../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 "-Wunknown-warning-option" +#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; @@ -2550,19 +2527,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; @@ -2762,15 +2731,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(); } @@ -2788,15 +2751,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(); } @@ -2815,25 +2772,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__) || @@ -3325,11 +3270,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 @@ -3338,11 +3279,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 @@ -3566,10 +3503,20 @@ stan::math::profile_map& get_stan_profile_data() { return basic_operations_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../../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 "-Wunknown-warning-option" +#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; @@ -3775,19 +3722,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; @@ -4004,15 +3943,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 { current_statement__ = 1; auto cvmat = @@ -4620,15 +4553,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 { current_statement__ = 1; auto cvmat = @@ -5237,25 +5164,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 { current_statement__ = 1; auto cvmat = @@ -5890,11 +5805,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, @@ -5961,11 +5872,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", @@ -6417,10 +6324,20 @@ stan::math::profile_map& get_stan_profile_data() { return basic_ops_mix_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../../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 "-Wunknown-warning-option" +#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; @@ -6475,19 +6392,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; @@ -6742,15 +6651,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(); } @@ -6768,15 +6671,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(); } @@ -6795,25 +6692,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__) || @@ -6837,11 +6722,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 @@ -6850,11 +6731,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 @@ -6988,10 +6865,20 @@ stan::math::profile_map& get_stan_profile_data() { return complex_data_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../../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 "-Wunknown-warning-option" +#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; @@ -7513,14 +7400,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>( @@ -7540,14 +7421,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; @@ -7563,14 +7438,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); @@ -7589,14 +7458,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; @@ -7608,14 +7471,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< @@ -7642,14 +7499,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; @@ -7665,14 +7516,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( @@ -7696,14 +7541,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; @@ -7728,14 +7567,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; @@ -7751,14 +7584,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< @@ -7794,14 +7621,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; @@ -7827,19 +7648,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; @@ -8110,15 +7923,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 { current_statement__ = 1; auto p_r = in__.template read(); @@ -8359,15 +8166,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 { current_statement__ = 1; auto p_r = in__.template read(); @@ -8609,25 +8410,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 { current_statement__ = 1; auto p_r = in__.template read(); @@ -9563,11 +9352,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; @@ -9613,11 +9398,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", @@ -10023,10 +9804,20 @@ stan::math::profile_map& get_stan_profile_data() { return complex_scalar_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../../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 "-Wunknown-warning-option" +#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; @@ -10055,19 +9846,11 @@ class complex_vectors_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 9; n = std::numeric_limits::min(); @@ -10111,15 +9894,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, @@ -10232,15 +10009,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, @@ -10354,25 +10125,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, @@ -10518,11 +10277,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 @@ -10531,11 +10286,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 @@ -10813,10 +10564,20 @@ stan::math::profile_map& get_stan_profile_data() { return complex_vectors_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../../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 "-Wunknown-warning-option" +#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; @@ -10905,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__ = 15; return Z; @@ -10929,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__ = 17; { @@ -10957,15 +10706,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; @@ -10981,15 +10724,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; { @@ -11009,15 +10746,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; @@ -11033,15 +10764,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; { @@ -11063,14 +10788,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; @@ -11088,14 +10807,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; { @@ -11117,19 +10830,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(); @@ -11161,15 +10866,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); @@ -11230,15 +10929,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); @@ -11300,25 +10993,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__) || @@ -11342,11 +11023,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 @@ -11355,11 +11032,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 @@ -11493,4 +11166,7 @@ stan::math::profile_map& get_stan_profile_data() { return user_function_templating_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] diff --git a/test/integration/good/code-gen/cpp.expected b/test/integration/good/code-gen/cpp.expected index 8340b77e6..d37e1875d 100644 --- a/test/integration/good/code-gen/cpp.expected +++ b/test/integration/good/code-gen/cpp.expected @@ -1,6 +1,13 @@ $ ../../../../../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 "-Wunknown-warning-option" +#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 +40,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 +103,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 { current_statement__ = 1; auto mu = in__.template read(); @@ -159,15 +152,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 { current_statement__ = 1; auto mu = in__.template read(); @@ -215,25 +202,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 { current_statement__ = 1; auto mu = in__.template read(); @@ -279,11 +254,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; @@ -311,11 +282,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", @@ -519,10 +486,20 @@ stan::math::profile_map& get_stan_profile_data() { return _8_schools_ncp_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -540,19 +517,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", @@ -586,15 +555,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 { current_statement__ = 1; auto bar = in__.template read(); @@ -618,15 +581,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 { current_statement__ = 1; auto bar = in__.template read(); @@ -651,25 +608,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 { current_statement__ = 1; auto bar = in__.template read(); @@ -696,11 +641,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; @@ -717,11 +658,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", @@ -868,10 +805,20 @@ stan::math::profile_map& get_stan_profile_data() { return _8start_with_number_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -921,14 +868,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, @@ -958,19 +899,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; @@ -1063,15 +996,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(); } @@ -1089,15 +1016,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(); } @@ -1116,25 +1037,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__) || @@ -1158,11 +1067,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 @@ -1171,11 +1076,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 @@ -1309,10 +1210,20 @@ stan::math::profile_map& get_stan_profile_data() { return complex_tuples_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -1343,19 +1254,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; @@ -1393,15 +1296,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 { current_statement__ = 1; auto y = in__.template read(); @@ -1494,15 +1391,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 { current_statement__ = 1; auto y = in__.template read(); @@ -1596,25 +1487,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 { current_statement__ = 1; auto y = in__.template read(); @@ -1749,11 +1628,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; @@ -1770,11 +1645,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", @@ -2025,10 +1896,20 @@ stan::math::profile_map& get_stan_profile_data() { return container_promotion_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -2156,42 +2037,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__ = 78; return _stan_STAN_MAJOR; @@ -2206,14 +2069,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: @@ -2357,19 +2160,11 @@ class cpp_reserved_words_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 64; context__.validate_dims("data initialization", "class", "double", @@ -2470,15 +2265,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 { current_statement__ = 1; auto _stan_explicit = in__.template read(); @@ -2547,15 +2336,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 { current_statement__ = 1; auto _stan_explicit = in__.template read(); @@ -2625,25 +2408,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 { current_statement__ = 1; auto _stan_explicit = in__.template read(); @@ -2780,11 +2551,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; @@ -2857,11 +2624,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", @@ -3234,10 +2997,20 @@ stan::math::profile_map& get_stan_profile_data() { return cpp_reserved_words_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -3317,15 +3090,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), @@ -3340,14 +3107,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( @@ -3363,14 +3124,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), @@ -3387,15 +3142,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), @@ -3413,14 +3162,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( @@ -3451,14 +3194,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), @@ -3478,19 +3215,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; @@ -3554,15 +3283,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 { current_statement__ = 1; auto p = @@ -3614,15 +3337,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 { current_statement__ = 1; auto p = @@ -3675,25 +3392,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 { current_statement__ = 1; auto p = @@ -3721,11 +3426,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__); @@ -3745,11 +3446,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", @@ -3923,10 +3620,20 @@ stan::math::profile_map& get_stan_profile_data() { return data_only_functions_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../install/default/bin/stanc --print-cpp deprecated_jacobian_usage.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 "-Wunknown-warning-option" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace deprecated_jacobian_usage_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -3950,14 +3657,8 @@ template 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 { local_scalar_t__ jacobian = DUMMY_VAR__; current_statement__ = 3; @@ -3980,19 +3681,11 @@ class deprecated_jacobian_usage_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 { @@ -4016,15 +3709,9 @@ class deprecated_jacobian_usage_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__ = "deprecated_jacobian_usage_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ jacobian = DUMMY_VAR__; current_statement__ = 1; @@ -4051,15 +3738,9 @@ class deprecated_jacobian_usage_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__ = "deprecated_jacobian_usage_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { local_scalar_t__ jacobian = DUMMY_VAR__; current_statement__ = 1; @@ -4087,25 +3768,13 @@ class deprecated_jacobian_usage_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__ = "deprecated_jacobian_usage_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { double jacobian = std::numeric_limits::quiet_NaN(); if (stan::math::logical_negation( @@ -4137,11 +3806,7 @@ class deprecated_jacobian_usage_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 @@ -4150,11 +3815,7 @@ class deprecated_jacobian_usage_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 @@ -4300,6 +3961,9 @@ stan::math::profile_map& get_stan_profile_data() { return deprecated_jacobian_usage_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif Warning in 'deprecated_jacobian_usage.stan', line 5, column 9: Variable name 'jacobian' will be a reserved word starting in Stan 2.38. Please rename it! @@ -4325,6 +3989,13 @@ Warning in 'deprecated_jacobian_usage.stan', line 12, column 2: Variable name $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -4342,19 +4013,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 { @@ -4378,15 +4041,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; { @@ -4420,15 +4077,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; { @@ -4463,25 +4114,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__) || @@ -4505,11 +4144,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 @@ -4518,11 +4153,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 @@ -4656,6 +4287,9 @@ 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? @@ -4663,6 +4297,13 @@ Warning in 'double-reject.stan', line 4, column 2: Unreachable statement $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -4695,19 +4336,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", @@ -4766,15 +4399,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 { current_statement__ = 1; auto mu = in__.template read(); @@ -4821,15 +4448,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 { current_statement__ = 1; auto mu = in__.template read(); @@ -4877,25 +4498,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 { current_statement__ = 1; auto mu = in__.template read(); @@ -4941,11 +4550,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; @@ -4973,11 +4578,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", @@ -5181,10 +4782,20 @@ stan::math::profile_map& get_stan_profile_data() { return eight_schools_ncp_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -5224,14 +4835,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); @@ -5248,14 +4853,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__) { @@ -5275,19 +4874,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(); @@ -5327,15 +4918,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; @@ -5368,15 +4953,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; @@ -5410,25 +4989,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__) || @@ -5452,11 +5019,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 @@ -5465,11 +5028,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 @@ -5603,10 +5162,20 @@ stan::math::profile_map& get_stan_profile_data() { return funcall_type_promotion_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../install/default/bin/stanc --print-cpp jacobian_pe.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 "-Wunknown-warning-option" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace jacobian_pe_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -5664,11 +5233,7 @@ upper_bound_jacobian(const T0__& x, const T1__& ub, 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__ = 12; if (jacobian__) { @@ -5693,12 +5258,8 @@ upper_bound_jacobian(const T0__& x_arg__, const T1__& ub, T_lp__& lp__, using local_scalar_t__ = stan::promote_args_t, T1__>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& x = stan::math::to_ref(x_arg__); local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 15; stan::math::validate_non_negative_index("result", "size(x)", @@ -5732,19 +5293,11 @@ class jacobian_pe_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__ = "jacobian_pe_model_namespace::jacobian_pe_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", "ub", "double", @@ -5788,15 +5341,9 @@ class jacobian_pe_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__ = "jacobian_pe_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { current_statement__ = 1; auto b_raw = in__.template read(); @@ -5842,15 +5389,9 @@ class jacobian_pe_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__ = "jacobian_pe_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { current_statement__ = 1; auto b_raw = in__.template read(); @@ -5897,25 +5438,13 @@ class jacobian_pe_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__ = "jacobian_pe_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { current_statement__ = 1; auto b_raw = in__.template read(); @@ -5972,11 +5501,7 @@ class jacobian_pe_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__ b_raw = DUMMY_VAR__; current_statement__ = 1; @@ -6004,11 +5529,7 @@ class jacobian_pe_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", "b_raw", "double", @@ -6220,10 +5741,20 @@ stan::math::profile_map& get_stan_profile_data() { return jacobian_pe_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -6244,19 +5775,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()); @@ -6286,15 +5809,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 { current_statement__ = 1; auto xx = in__.template read>(3); @@ -6343,15 +5860,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 { current_statement__ = 1; auto xx = in__.template read>(3); @@ -6401,25 +5912,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 { current_statement__ = 1; auto xx = in__.template read>(3); @@ -6491,11 +5990,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__); @@ -6514,11 +6009,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", @@ -6727,10 +6218,20 @@ stan::math::profile_map& get_stan_profile_data() { return mixed_type_arrays_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -8471,14 +7972,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)) { @@ -8517,14 +8012,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__); @@ -8548,14 +8037,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; @@ -8570,14 +8053,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; @@ -8595,14 +8072,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; @@ -8619,11 +8090,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; @@ -8640,14 +8107,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; @@ -8664,14 +8125,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; @@ -8690,14 +8145,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__); @@ -8715,11 +8164,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)); @@ -8734,14 +8179,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) { @@ -8943,14 +8382,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()); @@ -8978,14 +8411,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); @@ -9003,11 +8430,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__)); @@ -9025,14 +8448,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; { @@ -9063,14 +8480,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__; @@ -9128,16 +8539,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( @@ -9164,14 +8569,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; @@ -9203,11 +8602,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; @@ -9225,15 +8620,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)", @@ -9328,16 +8717,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__) { @@ -9414,16 +8797,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; @@ -9497,16 +8874,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; @@ -9580,16 +8951,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; @@ -9666,16 +9031,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; @@ -9754,16 +9113,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; @@ -9843,16 +9196,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; @@ -9931,16 +9278,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; @@ -10020,16 +9361,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; @@ -10110,16 +9445,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; @@ -10198,16 +9527,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; @@ -10287,16 +9610,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; @@ -10377,16 +9694,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; @@ -10398,14 +9709,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__; @@ -10429,14 +9734,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( @@ -10456,14 +9755,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( @@ -10480,14 +9773,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__); @@ -10508,14 +9795,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__); @@ -10552,16 +9833,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__); @@ -10595,16 +9870,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__); @@ -10733,19 +10002,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; @@ -12851,15 +12112,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 { current_statement__ = 1; auto p_real = in__.template read(); @@ -13310,15 +12565,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 { current_statement__ = 1; auto p_real = in__.template read(); @@ -13770,25 +13019,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 { current_statement__ = 1; auto p_real = in__.template read(); @@ -14839,11 +14076,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; @@ -15122,11 +14355,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", @@ -16795,10 +16024,20 @@ 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 [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -17211,14 +16450,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__); @@ -17265,14 +16498,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; @@ -17301,16 +16528,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( @@ -17340,16 +16561,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( @@ -17366,14 +16581,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); @@ -17402,16 +16611,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__); @@ -17453,19 +16656,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; @@ -17641,15 +16836,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 { current_statement__ = 1; auto y0_p = in__.template read>(2); @@ -17955,15 +17144,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 { current_statement__ = 1; auto y0_p = in__.template read>(2); @@ -18267,25 +17450,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 { current_statement__ = 1; auto y0_p = in__.template read>(2); @@ -18676,11 +17847,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__); @@ -18743,11 +17910,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", @@ -19199,6 +18362,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: @@ -19355,6 +18521,13 @@ 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 "-Wunknown-warning-option" +#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; @@ -20038,16 +19211,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; @@ -20070,19 +19237,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; @@ -20231,15 +19390,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 { current_statement__ = 1; auto r = in__.template read(); @@ -21877,15 +21030,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 { current_statement__ = 1; auto r = in__.template read(); @@ -23524,25 +22671,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 { current_statement__ = 1; auto r = in__.template read(); @@ -25193,11 +24328,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; @@ -25227,11 +24358,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", @@ -25471,10 +24598,20 @@ stan::math::profile_map& get_stan_profile_data() { return new_integrate_interface_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -25605,14 +24742,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; @@ -25656,19 +24787,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; @@ -25746,15 +24869,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 { current_statement__ = 1; auto alpha = @@ -25848,15 +24965,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 { current_statement__ = 1; auto alpha = @@ -25951,25 +25062,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 { current_statement__ = 1; auto alpha = @@ -26041,11 +25140,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; @@ -26087,11 +25182,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", @@ -26326,6 +25417,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: @@ -26334,6 +25428,13 @@ 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 "-Wunknown-warning-option" +#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; @@ -26589,19 +25690,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; @@ -26827,15 +25920,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 { current_statement__ = 1; auto alpha_v = @@ -27383,15 +26470,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 { current_statement__ = 1; auto alpha_v = @@ -27940,25 +27021,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 { current_statement__ = 1; auto alpha_v = @@ -28015,11 +27084,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__); @@ -28086,11 +27151,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", @@ -28434,10 +27495,20 @@ stan::math::profile_map& get_stan_profile_data() { return optimize_glm_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -28550,14 +27621,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); @@ -28572,14 +27637,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); @@ -28595,15 +27654,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); @@ -28619,15 +27672,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); @@ -28643,15 +27690,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); @@ -28670,14 +27711,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); @@ -28694,14 +27729,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( @@ -28720,14 +27749,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( @@ -28746,14 +27769,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( @@ -28777,14 +27794,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( @@ -28801,14 +27812,8 @@ template ::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 37; return (stan::math::sum(p) + 12); @@ -28828,19 +27833,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; @@ -28889,15 +27886,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 { current_statement__ = 1; auto y = in__.template read(); @@ -28970,15 +27961,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 { current_statement__ = 1; auto y = in__.template read(); @@ -29052,25 +28037,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 { current_statement__ = 1; auto y = in__.template read(); @@ -29100,11 +28073,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; @@ -29125,11 +28094,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", @@ -29286,10 +28251,20 @@ stan::math::profile_map& get_stan_profile_data() { return overloading_templating_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -29312,19 +28287,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", @@ -29368,15 +28335,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 { current_statement__ = 1; auto L_Omega = @@ -29409,15 +28370,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 { current_statement__ = 1; auto L_Omega = @@ -29451,25 +28406,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 { current_statement__ = 1; auto L_Omega = @@ -29516,11 +28459,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, @@ -29558,11 +28497,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", @@ -29776,10 +28711,20 @@ stan::math::profile_map& get_stan_profile_data() { return param_constraint_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -29797,19 +28742,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__) { @@ -29848,15 +28785,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(); } @@ -29874,15 +28805,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(); } @@ -29901,25 +28826,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__) || @@ -29943,11 +28856,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 @@ -29956,11 +28865,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 @@ -30094,10 +28999,20 @@ stan::math::profile_map& get_stan_profile_data() { return print_unicode_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -30139,14 +29054,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; @@ -30165,14 +29074,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)); @@ -30189,19 +29092,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 { @@ -30225,15 +29120,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(); } @@ -30251,15 +29140,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(); } @@ -30278,25 +29161,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__) || @@ -30340,11 +29211,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 @@ -30353,11 +29220,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 @@ -30523,10 +29386,20 @@ stan::math::profile_map& get_stan_profile_data() { return promotion_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -30648,15 +29521,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; @@ -30686,15 +29553,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)) { @@ -30724,15 +29585,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; @@ -30747,14 +29602,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__); @@ -30777,15 +29626,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; @@ -30813,15 +29656,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__); @@ -30836,15 +29673,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; @@ -30876,15 +29707,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; @@ -30919,16 +29744,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( @@ -30953,19 +29772,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", @@ -31009,15 +29820,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 { current_statement__ = 1; auto gamma = @@ -31053,15 +29858,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 { current_statement__ = 1; auto gamma = @@ -31098,25 +29897,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 { current_statement__ = 1; auto gamma = @@ -31161,11 +29948,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__); @@ -31185,11 +29968,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", @@ -31384,10 +30163,20 @@ stan::math::profile_map& get_stan_profile_data() { return recursive_slicing_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -31518,14 +30307,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)) { @@ -31558,14 +30341,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)) { @@ -31594,11 +30371,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); @@ -31615,19 +30388,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(); @@ -31665,15 +30430,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 { current_statement__ = 1; auto y1 = in__.template read>(N); @@ -31714,15 +30473,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 { current_statement__ = 1; auto y1 = in__.template read>(N); @@ -31764,25 +30517,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 { current_statement__ = 1; auto y1 = in__.template read>(N); @@ -31815,11 +30556,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__); @@ -31850,11 +30587,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", @@ -32043,10 +30776,20 @@ stan::math::profile_map& get_stan_profile_data() { return reduce_sum_m1_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -32725,14 +31468,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); @@ -32751,14 +31488,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; @@ -32788,14 +31519,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; @@ -32825,14 +31550,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; @@ -32868,14 +31587,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; @@ -32914,14 +31627,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; @@ -32961,14 +31668,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; @@ -33008,14 +31709,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; @@ -33060,14 +31755,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( @@ -33094,14 +31783,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; @@ -33136,14 +31819,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; @@ -33178,14 +31855,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; @@ -33226,14 +31897,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; @@ -33277,14 +31942,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; @@ -33329,14 +31988,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; @@ -33381,14 +32034,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; @@ -33423,19 +32070,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(); @@ -33554,15 +32193,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 { current_statement__ = 1; auto a8 = @@ -33698,15 +32331,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 { current_statement__ = 1; auto a8 = @@ -33843,25 +32470,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 { current_statement__ = 1; auto a8 = @@ -34069,11 +32684,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, @@ -34308,11 +32919,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", @@ -35088,10 +33695,20 @@ stan::math::profile_map& get_stan_profile_data() { return reduce_sum_m2_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -36380,14 +34997,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; @@ -36408,14 +35019,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; @@ -36434,14 +35039,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; @@ -36460,14 +35059,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; @@ -36486,14 +35079,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; @@ -36517,14 +35104,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; @@ -36546,14 +35127,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; @@ -36575,14 +35150,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; @@ -36604,14 +35173,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; @@ -36629,14 +35192,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; @@ -36655,14 +35212,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; @@ -36684,14 +35235,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; @@ -36719,14 +35264,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; @@ -36750,14 +35289,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; @@ -36781,15 +35314,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; @@ -36813,15 +35340,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; @@ -36845,15 +35366,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; @@ -36880,14 +35395,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; @@ -36912,14 +35421,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; @@ -36944,14 +35447,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; @@ -36976,14 +35473,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; @@ -37013,14 +35504,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; @@ -37048,14 +35533,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; @@ -37083,14 +35562,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; @@ -37118,14 +35591,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; @@ -37249,17 +35716,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, @@ -37273,14 +35734,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; @@ -37629,19 +36084,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; @@ -38217,15 +36664,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 { current_statement__ = 1; auto y1 = in__.template read>(N); @@ -38378,15 +36819,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 { current_statement__ = 1; auto y1 = in__.template read>(N); @@ -38540,25 +36975,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 { current_statement__ = 1; auto y1 = in__.template read>(N); @@ -38806,11 +37229,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__); @@ -38974,11 +37393,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", @@ -39662,10 +38077,20 @@ stan::math::profile_map& get_stan_profile_data() { return reduce_sum_m3_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -39688,19 +38113,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; @@ -39750,15 +38167,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 { current_statement__ = 1; auto x = in__.template read(); @@ -39806,15 +38217,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 { current_statement__ = 1; auto x = in__.template read(); @@ -39863,25 +38268,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 { current_statement__ = 1; auto x = in__.template read(); @@ -39908,11 +38301,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; @@ -39929,11 +38318,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", @@ -40080,10 +38465,20 @@ stan::math::profile_map& get_stan_profile_data() { return reject_exit_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -40124,14 +38519,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}; @@ -40148,14 +38537,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__>( @@ -40172,14 +38555,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< @@ -40200,19 +38577,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 { @@ -40236,15 +38605,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 { current_statement__ = 1; auto a = in__.template read(); @@ -40284,15 +38647,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 { current_statement__ = 1; auto a = in__.template read(); @@ -40333,25 +38690,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 { current_statement__ = 1; auto a = in__.template read(); @@ -40378,11 +38723,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; @@ -40399,11 +38740,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", @@ -40550,10 +38887,20 @@ stan::math::profile_map& get_stan_profile_data() { return return_position_types_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -40576,19 +38923,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 { @@ -40612,15 +38951,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(); } @@ -40638,15 +38971,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(); } @@ -40665,25 +38992,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__) || @@ -40737,11 +39052,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 @@ -40750,11 +39061,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 @@ -40921,6 +39228,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 @@ -40931,6 +39241,13 @@ 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 "-Wunknown-warning-option" +#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; @@ -41027,15 +39344,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__); @@ -41059,19 +39370,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; @@ -41129,15 +39432,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 { current_statement__ = 1; auto e = in__.template read(); @@ -41279,15 +39576,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 { current_statement__ = 1; auto e = in__.template read(); @@ -41430,25 +39721,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 { current_statement__ = 1; auto e = in__.template read(); @@ -41630,11 +39909,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; @@ -41789,11 +40064,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", @@ -42348,10 +40619,20 @@ stan::math::profile_map& get_stan_profile_data() { return shadowing_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -42403,11 +40684,7 @@ template ::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 1; return -(5); @@ -42421,11 +40698,7 @@ template ::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 3; return -(5); @@ -42441,11 +40714,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); @@ -42460,11 +40729,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); @@ -42479,11 +40744,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); @@ -42501,11 +40762,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); @@ -42522,19 +40779,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 { @@ -42558,15 +40807,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(); } @@ -42584,15 +40827,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(); } @@ -42611,25 +40848,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__) || @@ -42653,11 +40878,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 @@ -42666,11 +40887,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 @@ -42804,10 +41021,20 @@ stan::math::profile_map& get_stan_profile_data() { return single_argument_lpmf_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../install/default/bin/stanc --print-cpp stochastic_matrices.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 "-Wunknown-warning-option" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace stochastic_matrices_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -42847,19 +41074,11 @@ class stochastic_matrices_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__ = std::numeric_limits::min(); pos__ = 1; @@ -42992,15 +41211,9 @@ class stochastic_matrices_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__ = "stochastic_matrices_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { current_statement__ = 1; auto p_csm = @@ -43057,15 +41270,9 @@ class stochastic_matrices_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__ = "stochastic_matrices_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { current_statement__ = 1; auto p_csm = @@ -43123,25 +41330,13 @@ class stochastic_matrices_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__ = "stochastic_matrices_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { current_statement__ = 1; auto p_csm = @@ -43274,11 +41469,7 @@ class stochastic_matrices_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_csm = Eigen::Matrix::Constant(10, 10, DUMMY_VAR__); @@ -43327,11 +41518,7 @@ class stochastic_matrices_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_csm", "double", @@ -43729,10 +41916,20 @@ stan::math::profile_map& get_stan_profile_data() { return stochastic_matrices_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../install/default/bin/stanc --print-cpp sum_to_zero.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 "-Wunknown-warning-option" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif namespace sum_to_zero_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; @@ -43763,19 +41960,11 @@ class sum_to_zero_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__ = "sum_to_zero_model_namespace::sum_to_zero_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; @@ -43868,15 +42057,9 @@ class sum_to_zero_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__ = "sum_to_zero_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { current_statement__ = 1; auto p_stz = @@ -43922,15 +42105,9 @@ class sum_to_zero_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__ = "sum_to_zero_model_namespace::log_prob"; - // suppress unused var warning - (void) function__; try { current_statement__ = 1; auto p_stz = @@ -43977,25 +42154,13 @@ class sum_to_zero_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__ = "sum_to_zero_model_namespace::write_array"; - // suppress unused var warning - (void) function__; try { current_statement__ = 1; auto p_stz = @@ -44089,11 +42254,7 @@ class sum_to_zero_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 p_stz = Eigen::Matrix::Constant(10, DUMMY_VAR__); @@ -44129,11 +42290,7 @@ class sum_to_zero_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_stz", "double", @@ -44428,10 +42585,20 @@ stan::math::profile_map& get_stan_profile_data() { return sum_to_zero_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -44454,19 +42621,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", @@ -44500,15 +42659,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 { current_statement__ = 1; auto x = @@ -44560,15 +42713,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 { current_statement__ = 1; auto x = @@ -44621,25 +42768,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 { current_statement__ = 1; auto x = @@ -44668,11 +42803,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; @@ -44689,11 +42820,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", @@ -44840,10 +42967,20 @@ stan::math::profile_map& get_stan_profile_data() { return tilde_block_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -44980,19 +43117,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; @@ -45291,15 +43420,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 { current_statement__ = 1; auto p_1 = @@ -45741,15 +43864,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 { current_statement__ = 1; auto p_1 = @@ -46192,25 +44309,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 { current_statement__ = 1; auto p_1 = @@ -46792,11 +44897,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__); @@ -47010,11 +45111,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", @@ -47948,10 +46045,20 @@ stan::math::profile_map& get_stan_profile_data() { return transform_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -47988,19 +46095,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", @@ -48040,15 +46139,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 { current_statement__ = 1; auto m = in__.template read(); @@ -48158,15 +46251,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 { current_statement__ = 1; auto m = in__.template read(); @@ -48277,25 +46364,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 { current_statement__ = 1; auto m = in__.template read(); @@ -48327,11 +46402,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; @@ -48352,11 +46423,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", @@ -48513,10 +46580,20 @@ stan::math::profile_map& get_stan_profile_data() { return truncate_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -48538,14 +46615,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); @@ -48562,19 +46633,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 { @@ -48598,15 +46661,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 { current_statement__ = 1; auto x = in__.template read(); @@ -48634,15 +46691,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 { current_statement__ = 1; auto x = in__.template read(); @@ -48671,25 +46722,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 { current_statement__ = 1; auto x = in__.template read(); @@ -48716,11 +46755,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; @@ -48737,11 +46772,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", @@ -48888,10 +46919,20 @@ 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 [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -48919,14 +46960,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; @@ -48943,19 +46978,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 { @@ -48979,15 +47006,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 { current_statement__ = 1; auto x = @@ -49017,15 +47038,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 { current_statement__ = 1; auto x = @@ -49056,25 +47071,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 { current_statement__ = 1; auto x = @@ -49103,11 +47106,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; @@ -49124,11 +47123,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", @@ -49275,10 +47270,20 @@ stan::math::profile_map& get_stan_profile_data() { return user_constrain_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -49302,19 +47307,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; @@ -49372,15 +47369,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 { current_statement__ = 1; auto mu = in__.template read(); @@ -49412,15 +47403,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 { current_statement__ = 1; auto mu = in__.template read(); @@ -49453,25 +47438,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 { current_statement__ = 1; auto mu = in__.template read(); @@ -49503,11 +47476,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; @@ -49528,11 +47497,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", @@ -49689,10 +47654,20 @@ stan::math::profile_map& get_stan_profile_data() { return variable_named_context_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -49804,19 +47779,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", @@ -49882,15 +47849,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 { current_statement__ = 1; auto mu = in__.template read(); @@ -50401,15 +48362,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 { current_statement__ = 1; auto mu = in__.template read(); @@ -50921,25 +48876,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 { current_statement__ = 1; auto mu = in__.template read(); @@ -50979,11 +48922,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; @@ -51018,11 +48957,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", @@ -51234,4 +49169,7 @@ stan::math::profile_map& get_stan_profile_data() { return vector_truncate_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] diff --git a/test/integration/good/code-gen/expressions/cpp.expected b/test/integration/good/code-gen/expressions/cpp.expected index 1a928f407..b01a44dc7 100644 --- a/test/integration/good/code-gen/expressions/cpp.expected +++ b/test/integration/good/code-gen/expressions/cpp.expected @@ -1,6 +1,13 @@ $ ../../../../../../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 "-Wunknown-warning-option" +#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; @@ -38,19 +45,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__ = 14; context__.validate_dims("data initialization", "N", "int", @@ -102,15 +101,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 { current_statement__ = 1; auto v = in__.template read>(N); @@ -139,15 +132,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 { current_statement__ = 1; auto v = in__.template read>(N); @@ -177,25 +164,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 { current_statement__ = 1; auto v = in__.template read>(N); @@ -266,11 +241,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__); @@ -304,11 +275,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", @@ -572,10 +539,20 @@ stan::math::profile_map& get_stan_profile_data() { return operators_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../../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 "-Wunknown-warning-option" +#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; @@ -670,17 +647,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; @@ -706,15 +677,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; @@ -734,16 +699,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; @@ -763,16 +722,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); @@ -791,19 +744,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; @@ -863,15 +808,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(); } @@ -889,15 +828,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(); } @@ -916,25 +849,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__) || @@ -958,11 +879,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 @@ -971,11 +888,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 @@ -1109,10 +1022,20 @@ stan::math::profile_map& get_stan_profile_data() { return simple_function_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../../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 "-Wunknown-warning-option" +#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; @@ -1138,19 +1061,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", @@ -1184,15 +1099,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 { current_statement__ = 1; auto a = in__.template read>(2); @@ -1255,15 +1164,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 { current_statement__ = 1; auto a = in__.template read>(2); @@ -1327,25 +1230,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 { current_statement__ = 1; auto a = in__.template read>(2); @@ -1412,11 +1303,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__); @@ -1452,11 +1339,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", @@ -1706,4 +1589,7 @@ stan::math::profile_map& get_stan_profile_data() { return ternary_if_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] diff --git a/test/integration/good/code-gen/lir.expected b/test/integration/good/code-gen/lir.expected index 40f8d99a1..785c68cd4 100644 --- a/test/integration/good/code-gen/lir.expected +++ b/test/integration/good/code-gen/lir.expected @@ -1,6 +1,13 @@ $ ../../../../../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 \"-Wunknown-warning-option\"")) + (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 +2334,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 +2394,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 +2456,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 +2488,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 +2525,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 +2558,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 +2588,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 +2621,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 +2659,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 +2692,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 +2727,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 +3067,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 +3127,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 +3160,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 +3194,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 +3259,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 +3383,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 +3394,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 +3447,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 +3502,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 +3540,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 +3547,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 +3692,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 +3702,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 +3808,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 +3818,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 +3919,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 +3929,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 +4030,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 +4040,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 +4153,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 +4163,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 +4277,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 +4287,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 +4402,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 +4412,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 +4527,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 +4537,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 +4653,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 +4663,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 +4780,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 +4790,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 +4905,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 +4915,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 +5031,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 +5041,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 +5158,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 +5168,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 +5189,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 +5250,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 +5301,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 +5342,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 +5391,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 +5471,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 +5480,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 +5561,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 +5572,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 +5959,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 ((Expression (Assign (Var current_statement__) (Literal 1))) (VariableDefn @@ -7105,21 +6910,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 ((Expression (Assign (Var current_statement__) (Literal 1))) (VariableDefn @@ -8058,17 +7857,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__) @@ -8078,19 +7872,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 ((Expression (Assign (Var current_statement__) (Literal 1))) (VariableDefn @@ -10348,15 +10136,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__)) @@ -11018,15 +10802,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 @@ -16244,8 +16024,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)) @@ -16254,20 +16032,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__) @@ -20136,5 +19908,6 @@ (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")))))) [exit 0] diff --git a/test/integration/good/code-gen/ode/cpp.expected b/test/integration/good/code-gen/ode/cpp.expected index 88747233d..b48cdcbd0 100644 --- a/test/integration/good/code-gen/ode/cpp.expected +++ b/test/integration/good/code-gen/ode/cpp.expected @@ -1,6 +1,13 @@ $ ../../../../../../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 "-Wunknown-warning-option" +#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 +128,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 +152,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 +177,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 +211,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 +303,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 { current_statement__ = 1; auto y = in__.template read(); @@ -388,15 +363,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 { current_statement__ = 1; auto y = in__.template read(); @@ -455,25 +424,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 { current_statement__ = 1; auto y = in__.template read(); @@ -542,11 +499,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; @@ -580,11 +533,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", @@ -810,10 +759,20 @@ 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 [exit 0] $ ../../../../../../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 "-Wunknown-warning-option" +#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; @@ -992,15 +951,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__); @@ -1059,15 +1012,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__); @@ -1121,19 +1068,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; @@ -1230,15 +1169,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 { current_statement__ = 1; auto beta = @@ -1362,15 +1295,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 { current_statement__ = 1; auto beta = @@ -1495,25 +1422,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 { current_statement__ = 1; auto beta = @@ -1593,11 +1508,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; @@ -1626,11 +1537,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", @@ -1846,4 +1753,7 @@ stan::math::profile_map& get_stan_profile_data() { return overloaded_ode_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] diff --git a/test/integration/good/code-gen/opencl/cpp.expected b/test/integration/good/code-gen/opencl/cpp.expected index f173377f7..3d4be6c37 100644 --- a/test/integration/good/code-gen/opencl/cpp.expected +++ b/test/integration/good/code-gen/opencl/cpp.expected @@ -1,6 +1,13 @@ $ ../../../../../../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 "-Wunknown-warning-option" +#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 +804,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 +922,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 { current_statement__ = 1; auto p_real = in__.template read(); @@ -3970,15 +3963,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 { current_statement__ = 1; auto p_real = in__.template read(); @@ -7018,25 +7005,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 { current_statement__ = 1; auto p_real = in__.template read(); @@ -10079,11 +10054,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; @@ -10133,11 +10104,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", @@ -10417,10 +10384,20 @@ stan::math::profile_map& get_stan_profile_data() { return distributions_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../../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 "-Wunknown-warning-option" +#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; @@ -10483,19 +10460,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; @@ -10606,15 +10575,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 { current_statement__ = 1; auto p_real = in__.template read(); @@ -10706,15 +10669,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 { current_statement__ = 1; auto p_real = in__.template read(); @@ -10807,25 +10764,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 { current_statement__ = 1; auto p_real = in__.template read(); @@ -10924,11 +10869,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; @@ -10978,11 +10919,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", @@ -11262,4 +11199,7 @@ stan::math::profile_map& get_stan_profile_data() { return restricted_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] diff --git a/test/integration/good/code-gen/profiling/cpp.expected b/test/integration/good/code-gen/profiling/cpp.expected index f21c8280a..639d8a3bd 100644 --- a/test/integration/good/code-gen/profiling/cpp.expected +++ b/test/integration/good/code-gen/profiling/cpp.expected @@ -1,6 +1,13 @@ $ ../../../../../../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 "-Wunknown-warning-option" +#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 +55,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 +133,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 { current_statement__ = 1; auto rho = @@ -234,15 +227,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 { current_statement__ = 1; auto rho = @@ -335,25 +322,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 { current_statement__ = 1; auto rho = @@ -392,11 +367,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 +392,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,4 +558,7 @@ stan::math::profile_map& get_stan_profile_data() { return simple_function_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] diff --git a/test/integration/good/code-gen/standalone_functions/cpp.expected b/test/integration/good/code-gen/standalone_functions/cpp.expected index 2a9fd9480..44a3ee55e 100644 --- a/test/integration/good/code-gen/standalone_functions/cpp.expected +++ b/test/integration/good/code-gen/standalone_functions/cpp.expected @@ -1,6 +1,13 @@ $ ../../../../../../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 "-Wunknown-warning-option" +#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; @@ -127,14 +134,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); @@ -153,14 +154,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); @@ -175,14 +170,8 @@ template ::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 5; return stan::math::sum(a); @@ -198,15 +187,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)", @@ -230,14 +213,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); @@ -253,14 +230,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); @@ -278,11 +249,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)); @@ -298,14 +265,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__); @@ -323,11 +284,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); @@ -343,15 +300,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); @@ -383,14 +334,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; @@ -411,12 +356,8 @@ upper_bound_jacobian(const T0__& x_arg__, const T1__& ub, T_lp__& lp__, using local_scalar_t__ = stan::promote_args_t, T1__>; int current_statement__ = 0; - // suppress unused var warning - (void) current_statement__; const auto& x = stan::math::to_ref(x_arg__); local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 25; if (jacobian__) { @@ -496,10 +437,20 @@ upper_bound_jacobian(const Eigen::Matrix& x, const double& ub, return basic_model_namespace::upper_bound_jacobian(x, ub, lp__, lp_accum__, pstream__); } +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../../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 "-Wunknown-warning-option" +#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; @@ -584,14 +535,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); @@ -610,14 +555,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); @@ -632,14 +571,8 @@ template ::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { current_statement__ = 5; return stan::math::sum(a); @@ -655,15 +588,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)", @@ -687,14 +614,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); @@ -710,14 +631,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); @@ -735,11 +650,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)); @@ -755,14 +666,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__); @@ -780,11 +685,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); @@ -840,10 +741,20 @@ 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 [exit 0] $ ../../../../../../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 "-Wunknown-warning-option" +#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; @@ -930,15 +841,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))); @@ -980,14 +885,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__); @@ -1008,14 +907,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()); @@ -1052,6 +945,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 742d8ad7e..3bf96330a 100644 --- a/test/integration/good/compiler-optimizations/cpp.expected +++ b/test/integration/good/compiler-optimizations/cpp.expected @@ -1,6 +1,13 @@ $ ../../../../../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 "-Wunknown-warning-option" +#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 +38,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 +688,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 +760,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 +834,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 +928,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 +947,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", @@ -1866,10 +1833,20 @@ 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 [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -2000,14 +1977,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__; @@ -2070,19 +2041,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", @@ -2165,15 +2128,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__; @@ -2288,15 +2245,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__; @@ -2412,25 +2363,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__; @@ -2548,11 +2487,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; @@ -2581,11 +2516,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", @@ -2785,6 +2716,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: @@ -2793,6 +2727,13 @@ 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 "-Wunknown-warning-option" +#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; @@ -2817,19 +2758,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; @@ -3475,15 +3408,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__; @@ -3521,15 +3448,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__; @@ -3572,25 +3493,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__; @@ -3640,11 +3549,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; @@ -3663,11 +3568,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", @@ -4480,10 +4381,20 @@ stan::math::profile_map& get_stan_profile_data() { return ad_levels_deep_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -4514,19 +4425,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", @@ -4566,15 +4469,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__; @@ -4636,15 +4533,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__; @@ -4707,25 +4598,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__; @@ -4755,11 +4634,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; @@ -4778,11 +4653,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", @@ -4981,10 +4852,20 @@ stan::math::profile_map& get_stan_profile_data() { return copy_prop_profile_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -5083,14 +4964,8 @@ template ::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int lcm_sym25__; int lcm_sym24__; @@ -5126,14 +5001,8 @@ template ::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int lcm_sym31__; int lcm_sym30__; @@ -5182,16 +5051,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__; @@ -5336,19 +5199,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; @@ -5574,15 +5429,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__; @@ -6008,15 +5857,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__; @@ -6442,25 +6285,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__; @@ -6780,11 +6611,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; @@ -6807,11 +6634,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", @@ -7051,10 +6874,20 @@ stan::math::profile_map& get_stan_profile_data() { return copy_fail_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -7152,19 +6985,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; @@ -7359,15 +7184,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__; @@ -7633,15 +7452,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__; @@ -7908,25 +7721,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__; @@ -8018,11 +7819,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; @@ -8109,11 +7906,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", @@ -8572,10 +8365,20 @@ stan::math::profile_map& get_stan_profile_data() { return dce_fail_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -8604,19 +8407,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", @@ -8668,15 +8463,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(); } @@ -8694,15 +8483,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(); } @@ -8721,25 +8504,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__; @@ -8765,11 +8536,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 @@ -8778,11 +8545,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 @@ -8916,10 +8679,20 @@ stan::math::profile_map& get_stan_profile_data() { return expr_prop_experiment_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -8946,19 +8719,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", @@ -9009,15 +8774,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(); } @@ -9035,15 +8794,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(); } @@ -9062,25 +8815,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__; @@ -9106,11 +8847,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 @@ -9119,11 +8856,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 @@ -9257,10 +8990,20 @@ stan::math::profile_map& get_stan_profile_data() { return expr_prop_experiment2_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -9293,19 +9036,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; @@ -9369,15 +9104,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__; @@ -9462,15 +9191,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__; @@ -9556,25 +9279,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__; @@ -9615,11 +9326,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; @@ -9647,11 +9354,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", @@ -9854,10 +9557,20 @@ stan::math::profile_map& get_stan_profile_data() { return expr_prop_fail_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -9886,19 +9599,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", @@ -9955,15 +9660,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__; @@ -10001,15 +9700,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__; @@ -10048,25 +9741,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__; @@ -10103,11 +9784,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; @@ -10133,11 +9810,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", @@ -10311,10 +9984,20 @@ stan::math::profile_map& get_stan_profile_data() { return expr_prop_fail2_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -10406,19 +10089,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; @@ -10678,15 +10353,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__; @@ -10870,15 +10539,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__; @@ -11063,25 +10726,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__; @@ -11261,11 +10912,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; @@ -11334,11 +10981,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", @@ -11782,10 +11425,20 @@ stan::math::profile_map& get_stan_profile_data() { return expr_prop_fail3_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -11858,19 +11511,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; @@ -11995,15 +11640,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__; @@ -12066,15 +11705,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__; @@ -12141,25 +11774,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__; @@ -12313,11 +11934,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; @@ -12340,11 +11957,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", @@ -12616,10 +12229,20 @@ stan::math::profile_map& get_stan_profile_data() { return expr_prop_fail4_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -12720,14 +12343,8 @@ template ::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int lcm_sym25__; int lcm_sym24__; @@ -12763,14 +12380,8 @@ template ::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int lcm_sym31__; int lcm_sym30__; @@ -12819,16 +12430,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__; @@ -12968,19 +12573,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; @@ -13148,15 +12745,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__; @@ -13580,15 +13171,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__; @@ -14012,25 +13597,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__; @@ -14354,11 +13927,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; @@ -14389,11 +13958,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", @@ -14668,10 +14233,20 @@ stan::math::profile_map& get_stan_profile_data() { return expr_prop_fail5_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -14873,14 +14448,8 @@ template ::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int lcm_sym51__; int lcm_sym50__; @@ -14916,14 +14485,8 @@ template ::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int lcm_sym57__; int lcm_sym56__; @@ -14971,16 +14534,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__; @@ -15137,15 +14694,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__; @@ -15678,19 +15231,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; @@ -15873,15 +15418,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__; @@ -16799,15 +16338,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__; @@ -17729,25 +17262,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__; @@ -18411,11 +17932,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; @@ -18456,11 +17973,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", @@ -18836,10 +18349,20 @@ stan::math::profile_map& get_stan_profile_data() { return expr_prop_fail6_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -18907,19 +18430,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; @@ -19111,15 +18626,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__; @@ -19292,15 +18801,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__; @@ -19477,25 +18980,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__; @@ -19722,11 +19213,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; @@ -19761,11 +19248,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", @@ -20074,10 +19557,20 @@ stan::math::profile_map& get_stan_profile_data() { return expr_prop_fail7_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -20127,19 +19620,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; @@ -20251,15 +19736,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__; @@ -20323,15 +19802,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__; @@ -20400,25 +19873,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__; @@ -20490,11 +19951,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; @@ -20535,11 +19992,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", @@ -20814,10 +20267,20 @@ stan::math::profile_map& get_stan_profile_data() { return expr_prop_fail8_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -20916,14 +20379,8 @@ template ::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int lcm_sym25__; int lcm_sym24__; @@ -20959,14 +20416,8 @@ template ::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int lcm_sym31__; int lcm_sym30__; @@ -21015,16 +20466,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__; @@ -21169,19 +20614,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; @@ -21407,15 +20844,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__; @@ -21841,15 +21272,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__; @@ -22275,25 +21700,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__; @@ -22613,11 +22026,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; @@ -22640,11 +22049,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", @@ -22884,10 +22289,20 @@ stan::math::profile_map& get_stan_profile_data() { return fails_test_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -22919,12 +22334,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__; { @@ -22943,12 +22354,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__; { @@ -22973,19 +22380,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; @@ -23080,15 +22479,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__; { @@ -23123,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_sym19__; { @@ -23167,25 +22554,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__; @@ -23211,11 +22586,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 @@ -23224,11 +22595,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 @@ -23362,10 +22729,20 @@ 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 [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -23405,14 +22782,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; @@ -23428,15 +22799,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__; @@ -23481,19 +22846,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", @@ -23527,15 +22884,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__; @@ -23623,15 +22974,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__; @@ -23720,25 +23065,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__; @@ -23764,11 +23097,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 @@ -23777,11 +23106,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 @@ -23915,10 +23240,20 @@ 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 [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -23937,19 +23272,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 { @@ -23973,15 +23300,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()); @@ -24019,15 +23340,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()); @@ -24066,25 +23381,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__; @@ -24110,11 +23413,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 @@ -24123,11 +23422,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 @@ -24261,6 +23556,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 @@ -24279,6 +23577,13 @@ 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 "-Wunknown-warning-option" +#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; @@ -24300,19 +23605,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 { @@ -24336,15 +23633,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__; @@ -24404,15 +23695,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__; @@ -24478,25 +23763,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__; @@ -24602,11 +23875,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; @@ -24638,11 +23907,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", @@ -24942,10 +24207,20 @@ stan::math::profile_map& get_stan_profile_data() { return initialize_SoA_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -24983,15 +24258,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; @@ -25007,15 +24276,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__; { @@ -25045,19 +24308,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 { @@ -25081,15 +24336,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__; current_statement__ = 1; @@ -25152,15 +24401,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__; current_statement__ = 1; @@ -25232,25 +24475,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__; @@ -25324,11 +24555,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; @@ -25353,11 +24580,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", @@ -25633,10 +24856,20 @@ stan::math::profile_map& get_stan_profile_data() { return inline_functions_varmat_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -25663,14 +24896,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__; { @@ -25696,19 +24923,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; @@ -25758,15 +24977,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__; current_statement__ = 1; @@ -25796,15 +25009,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__; current_statement__ = 1; @@ -25835,25 +25042,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__; @@ -25882,11 +25077,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; @@ -25903,11 +25094,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", @@ -26054,10 +25241,20 @@ stan::math::profile_map& get_stan_profile_data() { return inline_tdata_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -26087,15 +25284,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__; { @@ -26122,19 +25313,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", @@ -26172,15 +25355,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 = @@ -26220,15 +25397,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 = @@ -26271,25 +25442,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__; @@ -26337,11 +25496,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 @@ -26350,11 +25505,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 @@ -26516,10 +25667,20 @@ stan::math::profile_map& get_stan_profile_data() { return inliner_same_names_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -26723,14 +25884,8 @@ template ::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int lcm_sym57__; int lcm_sym56__; @@ -26766,14 +25921,8 @@ template ::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int lcm_sym63__; int lcm_sym62__; @@ -26821,16 +25970,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__; @@ -26985,15 +26128,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__; @@ -27506,15 +26645,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__; @@ -27590,19 +26723,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; @@ -27787,15 +26912,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__; @@ -28682,15 +27801,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__; @@ -29581,25 +28694,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__; @@ -30269,11 +29370,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; @@ -30310,11 +29407,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", @@ -30681,10 +29774,20 @@ stan::math::profile_map& get_stan_profile_data() { return inlining_fail2_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -30711,19 +29814,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", @@ -30773,15 +29868,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(); } @@ -30799,15 +29888,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(); } @@ -30826,25 +29909,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__; @@ -30870,11 +29941,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 @@ -30883,11 +29950,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 @@ -31021,10 +30084,20 @@ stan::math::profile_map& get_stan_profile_data() { return lcm_experiment_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -31047,19 +30120,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 { @@ -31083,15 +30148,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__; @@ -31132,15 +30191,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__; @@ -31182,25 +30235,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__; @@ -31229,11 +30270,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; @@ -31250,11 +30287,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", @@ -31401,10 +30434,20 @@ stan::math::profile_map& get_stan_profile_data() { return lcm_experiment2_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -31427,19 +30470,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", @@ -31485,15 +30520,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__; current_statement__ = 1; @@ -31522,15 +30551,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__; current_statement__ = 1; @@ -31560,25 +30583,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__; @@ -31607,11 +30618,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; @@ -31629,11 +30636,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", @@ -31788,10 +30791,20 @@ stan::math::profile_map& get_stan_profile_data() { return lcm_fails_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -31886,14 +30899,8 @@ template ::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int lcm_sym25__; int lcm_sym24__; @@ -31929,14 +30936,8 @@ template ::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int lcm_sym31__; int lcm_sym30__; @@ -31985,16 +30986,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__; @@ -32134,19 +31129,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; @@ -32312,15 +31299,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__; @@ -32723,15 +31704,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__; @@ -33134,25 +32109,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__; @@ -33449,11 +32412,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; @@ -33474,11 +32433,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", @@ -33689,10 +32644,20 @@ stan::math::profile_map& get_stan_profile_data() { return lcm_fails2_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -33738,11 +32703,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__; { @@ -33762,11 +32723,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__; { @@ -33784,11 +32741,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__; { @@ -33808,19 +32761,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", @@ -33854,15 +32799,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__; @@ -33910,15 +32849,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__; @@ -33967,25 +32900,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__; @@ -34043,11 +32964,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; @@ -34064,11 +32981,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", @@ -34242,10 +33155,20 @@ stan::math::profile_map& get_stan_profile_data() { return lupdf_inlining_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -34330,19 +33253,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; @@ -34516,15 +33431,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__; @@ -34637,15 +33546,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__; @@ -34759,25 +33662,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__; @@ -34947,11 +33838,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; @@ -34980,11 +33867,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", @@ -35229,10 +34112,20 @@ stan::math::profile_map& get_stan_profile_data() { return off_dce_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -35298,19 +34191,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; @@ -35459,15 +34344,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__; @@ -35589,15 +34468,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__; @@ -35720,25 +34593,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__; @@ -35860,11 +34721,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; @@ -35913,11 +34770,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", @@ -36227,10 +35080,20 @@ stan::math::profile_map& get_stan_profile_data() { return off_small_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -36353,11 +35216,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__; { @@ -36378,14 +35237,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__; @@ -36408,11 +35261,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); @@ -36431,19 +35280,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 { @@ -36467,15 +35308,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__; @@ -37001,15 +35836,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__; @@ -37539,25 +36368,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__; @@ -37602,11 +36419,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; @@ -37645,11 +36458,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", @@ -37959,10 +36768,20 @@ stan::math::profile_map& get_stan_profile_data() { return optimizations_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -37988,14 +36807,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__; { @@ -38011,14 +36824,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__; { @@ -38038,19 +36845,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 { @@ -38074,15 +36873,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__; { @@ -38109,15 +36902,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__; { @@ -38145,25 +36932,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__; @@ -38189,11 +36964,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 @@ -38202,11 +36973,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 @@ -38340,10 +37107,20 @@ stan::math::profile_map& get_stan_profile_data() { return overloaded_fn_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -38377,15 +37154,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__; { @@ -38401,11 +37172,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__; { @@ -38425,14 +37192,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__; { @@ -38452,19 +37213,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 { @@ -38488,15 +37241,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__; { @@ -38524,15 +37271,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__; { @@ -38561,25 +37302,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__; @@ -38605,11 +37334,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 @@ -38618,11 +37343,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 @@ -38756,10 +37477,20 @@ stan::math::profile_map& get_stan_profile_data() { return overloaded_fn2_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -38779,19 +37510,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 { @@ -38815,15 +37538,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; @@ -38855,15 +37572,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; @@ -38896,25 +37607,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__; @@ -38953,11 +37652,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 @@ -38966,11 +37661,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 @@ -39137,10 +37828,20 @@ stan::math::profile_map& get_stan_profile_data() { return partial_eval_tuple_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -39199,19 +37900,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; @@ -39359,15 +38052,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__; @@ -39477,15 +38164,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__; @@ -39596,25 +38277,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__; @@ -39703,11 +38372,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; @@ -39744,11 +38409,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", @@ -40010,10 +38671,20 @@ stan::math::profile_map& get_stan_profile_data() { return partial_eval_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -40049,19 +38720,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; @@ -41335,15 +39998,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__; @@ -41397,15 +40054,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__; @@ -41462,25 +40113,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__; @@ -41514,11 +40153,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; @@ -41543,11 +40178,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", @@ -42951,10 +41582,20 @@ stan::math::profile_map& get_stan_profile_data() { return partial_eval_multiply_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -42979,19 +41620,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; @@ -43044,15 +41677,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(); } @@ -43070,15 +41697,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(); } @@ -43097,25 +41718,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__; @@ -43141,11 +41750,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 @@ -43154,11 +41759,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 @@ -43292,10 +41893,20 @@ stan::math::profile_map& get_stan_profile_data() { return partial_eval_zeros_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -43360,19 +41971,11 @@ class stalled1_failure_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__; pos__ = 1; @@ -43501,15 +42104,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__; @@ -43624,15 +42221,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__; @@ -43749,25 +42340,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__; @@ -43922,11 +42501,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; @@ -43972,11 +42547,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", @@ -44321,10 +42892,20 @@ stan::math::profile_map& get_stan_profile_data() { return stalled1_failure_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -44349,19 +42930,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; @@ -44399,15 +42972,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__; @@ -44522,15 +43089,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__; @@ -44646,25 +43207,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__; @@ -44830,11 +43379,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; @@ -44851,11 +43396,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", @@ -45026,10 +43567,20 @@ 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 [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -45056,19 +43607,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 { @@ -45092,15 +43635,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__; @@ -45182,15 +43719,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__; @@ -45273,25 +43804,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__; @@ -45386,11 +43905,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; @@ -45407,11 +43922,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", @@ -45587,12 +44098,22 @@ 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. [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -45621,19 +44142,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 { @@ -45657,15 +44170,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(); } @@ -45683,15 +44190,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(); } @@ -45710,25 +44211,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__; @@ -46030,11 +44519,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 @@ -46043,11 +44528,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 @@ -46193,4 +44674,7 @@ stan::math::profile_map& get_stan_profile_data() { return unroll_limit_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] diff --git a/test/integration/good/compiler-optimizations/cppO0.expected b/test/integration/good/compiler-optimizations/cppO0.expected index 7be704b46..9a593bebb 100644 --- a/test/integration/good/compiler-optimizations/cppO0.expected +++ b/test/integration/good/compiler-optimizations/cppO0.expected @@ -1,6 +1,13 @@ $ ../../../../../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 "-Wunknown-warning-option" +#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 +35,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 +90,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 { current_statement__ = 1; auto X_p = @@ -160,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 { current_statement__ = 1; auto X_p = @@ -230,25 +217,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 { current_statement__ = 1; auto X_p = @@ -328,11 +303,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__); @@ -352,11 +323,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", @@ -644,10 +611,20 @@ 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 [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -780,14 +757,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__); @@ -844,19 +815,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", @@ -939,15 +902,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 { current_statement__ = 1; auto beta = @@ -1039,15 +996,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 { current_statement__ = 1; auto beta = @@ -1140,25 +1091,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 { current_statement__ = 1; auto beta = @@ -1227,11 +1166,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; @@ -1260,11 +1195,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", @@ -1464,6 +1395,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: @@ -1472,6 +1406,13 @@ 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 "-Wunknown-warning-option" +#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; @@ -1493,19 +1434,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; @@ -1556,15 +1489,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 { current_statement__ = 1; auto X_p = @@ -1601,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 { current_statement__ = 1; auto X_p = @@ -1647,25 +1568,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 { current_statement__ = 1; auto X_p = @@ -1711,11 +1620,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__); @@ -1735,11 +1640,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", @@ -1954,10 +1855,20 @@ stan::math::profile_map& get_stan_profile_data() { return ad_levels_deep_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -1991,19 +1902,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", @@ -2043,15 +1946,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 { current_statement__ = 1; auto X = @@ -2115,15 +2012,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 { current_statement__ = 1; auto X = @@ -2188,25 +2079,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 { current_statement__ = 1; auto X = @@ -2234,11 +2113,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__); @@ -2258,11 +2133,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", @@ -2436,10 +2307,20 @@ stan::math::profile_map& get_stan_profile_data() { return copy_prop_profile_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -2546,14 +2427,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) { @@ -2576,14 +2451,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) { @@ -2616,16 +2485,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); @@ -2682,19 +2545,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; @@ -2860,15 +2715,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 { current_statement__ = 1; auto mean_p = @@ -2989,15 +2838,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 { current_statement__ = 1; auto mean_p = @@ -3119,25 +2962,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 { current_statement__ = 1; auto mean_p = @@ -3231,11 +3062,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; @@ -3259,11 +3086,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", @@ -3492,10 +3315,20 @@ stan::math::profile_map& get_stan_profile_data() { return copy_fail_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -3589,19 +3422,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; @@ -3789,15 +3614,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 { current_statement__ = 1; auto sigma = @@ -3962,15 +3781,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 { current_statement__ = 1; auto sigma = @@ -4136,25 +3949,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 { current_statement__ = 1; auto sigma = @@ -4244,11 +4045,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; @@ -4341,11 +4138,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", @@ -4737,10 +4530,20 @@ stan::math::profile_map& get_stan_profile_data() { return dce_fail_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -4769,19 +4572,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", @@ -4833,15 +4628,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(); } @@ -4859,15 +4648,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(); } @@ -4886,25 +4669,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__) || @@ -4928,11 +4699,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 @@ -4941,11 +4708,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 @@ -5079,10 +4842,20 @@ stan::math::profile_map& get_stan_profile_data() { return expr_prop_experiment_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -5108,19 +4881,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", @@ -5171,15 +4936,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(); } @@ -5197,15 +4956,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(); } @@ -5224,25 +4977,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__) || @@ -5266,11 +5007,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 @@ -5279,11 +5016,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 @@ -5417,10 +5150,20 @@ stan::math::profile_map& get_stan_profile_data() { return expr_prop_experiment2_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -5449,19 +5192,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; @@ -5518,15 +5253,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 { current_statement__ = 1; auto mu = @@ -5587,15 +5316,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 { current_statement__ = 1; auto mu = @@ -5657,25 +5380,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 { current_statement__ = 1; auto mu = @@ -5714,11 +5425,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__); @@ -5748,11 +5455,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", @@ -5945,10 +5648,20 @@ stan::math::profile_map& get_stan_profile_data() { return expr_prop_fail_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -5977,19 +5690,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", @@ -6046,15 +5751,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 { current_statement__ = 1; auto mu = in__.template read(); @@ -6090,15 +5789,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 { current_statement__ = 1; auto mu = in__.template read(); @@ -6135,25 +5828,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 { current_statement__ = 1; auto mu = in__.template read(); @@ -6188,11 +5869,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; @@ -6219,11 +5896,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", @@ -6397,10 +6070,20 @@ stan::math::profile_map& get_stan_profile_data() { return expr_prop_fail2_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -6484,19 +6167,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; @@ -6733,15 +6408,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 { current_statement__ = 1; auto a = @@ -6855,15 +6524,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 { current_statement__ = 1; auto a = @@ -6978,25 +6641,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 { current_statement__ = 1; auto a = @@ -7111,11 +6762,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__); @@ -7192,11 +6839,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", @@ -7565,10 +7208,20 @@ stan::math::profile_map& get_stan_profile_data() { return expr_prop_fail3_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -7637,19 +7290,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; @@ -7767,15 +7412,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 { current_statement__ = 1; auto tau_phi = @@ -7833,15 +7472,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 { current_statement__ = 1; auto tau_phi = @@ -7900,25 +7533,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 { current_statement__ = 1; auto tau_phi = @@ -8038,11 +7659,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; @@ -8067,11 +7684,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", @@ -8330,10 +7943,20 @@ stan::math::profile_map& get_stan_profile_data() { return expr_prop_fail4_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -8445,14 +8068,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) { @@ -8475,14 +8092,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) { @@ -8515,16 +8126,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); @@ -8583,19 +8188,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; @@ -8723,15 +8320,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 { current_statement__ = 1; auto mean_phi = @@ -8862,15 +8453,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 { current_statement__ = 1; auto mean_phi = @@ -9002,25 +8587,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 { current_statement__ = 1; auto mean_phi = @@ -9131,11 +8704,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; @@ -9167,11 +8736,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", @@ -9435,10 +9000,20 @@ stan::math::profile_map& get_stan_profile_data() { return expr_prop_fail5_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -9651,14 +9226,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) { @@ -9681,14 +9250,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) { @@ -9720,16 +9283,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; @@ -9810,15 +9367,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; @@ -10040,19 +9593,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; @@ -10195,15 +9740,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 { current_statement__ = 1; auto mean_phi = @@ -10331,15 +9870,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 { current_statement__ = 1; auto mean_phi = @@ -10468,25 +10001,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 { current_statement__ = 1; auto mean_phi = @@ -10756,11 +10277,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; @@ -10804,11 +10321,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", @@ -11163,10 +10676,20 @@ stan::math::profile_map& get_stan_profile_data() { return expr_prop_fail6_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -11226,19 +10749,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; @@ -11379,15 +10894,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 { current_statement__ = 1; auto pi = @@ -11462,15 +10971,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 { current_statement__ = 1; auto pi = @@ -11546,25 +11049,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 { current_statement__ = 1; auto pi = @@ -11645,11 +11136,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__); @@ -11685,11 +11172,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", @@ -11925,10 +11408,20 @@ stan::math::profile_map& get_stan_profile_data() { return expr_prop_fail7_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -11974,19 +11467,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; @@ -12091,15 +11576,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 { current_statement__ = 1; auto beta0 = in__.template read(); @@ -12160,15 +11639,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 { current_statement__ = 1; auto beta0 = in__.template read(); @@ -12230,25 +11703,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 { current_statement__ = 1; auto beta0 = in__.template read(); @@ -12316,11 +11777,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; @@ -12363,11 +11820,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", @@ -12620,10 +12073,20 @@ stan::math::profile_map& get_stan_profile_data() { return expr_prop_fail8_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -12730,14 +12193,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) { @@ -12760,14 +12217,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) { @@ -12800,16 +12251,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); @@ -12866,19 +12311,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; @@ -13044,15 +12481,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 { current_statement__ = 1; auto mean_p = @@ -13173,15 +12604,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 { current_statement__ = 1; auto mean_p = @@ -13303,25 +12728,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 { current_statement__ = 1; auto mean_p = @@ -13415,11 +12828,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; @@ -13443,11 +12852,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", @@ -13676,10 +13081,20 @@ stan::math::profile_map& get_stan_profile_data() { return fails_test_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -13711,12 +13126,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); @@ -13732,12 +13143,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__); @@ -13756,19 +13163,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; @@ -13816,15 +13215,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; @@ -13851,15 +13244,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; @@ -13887,25 +13274,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__) || @@ -13929,11 +13304,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 @@ -13942,11 +13313,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 @@ -14080,10 +13447,20 @@ 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 [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -14124,14 +13501,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)) { @@ -14153,15 +13524,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; @@ -14192,19 +13557,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", @@ -14238,15 +13595,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); @@ -14280,15 +13631,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); @@ -14323,25 +13668,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__) || @@ -14365,11 +13698,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 @@ -14378,11 +13707,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 @@ -14516,10 +13841,20 @@ 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 [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -14538,19 +13873,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 { @@ -14574,15 +13901,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()); @@ -14621,15 +13942,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()); @@ -14669,25 +13984,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__) || @@ -14711,11 +14014,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 @@ -14724,11 +14023,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 @@ -14862,6 +14157,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 @@ -14880,6 +14178,13 @@ 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 "-Wunknown-warning-option" +#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; @@ -14902,19 +14207,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 { @@ -14938,15 +14235,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 { current_statement__ = 1; auto y = in__.template read>(3); @@ -14991,15 +14282,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 { current_statement__ = 1; auto y = in__.template read>(3); @@ -15045,25 +14330,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 { current_statement__ = 1; auto y = in__.template read>(3); @@ -15110,11 +14383,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__); @@ -15147,11 +14416,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", @@ -15372,10 +14637,20 @@ stan::math::profile_map& get_stan_profile_data() { return initialize_SoA_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -15413,15 +14688,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; @@ -15437,15 +14706,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__); @@ -15471,19 +14734,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 { @@ -15507,15 +14762,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 { current_statement__ = 1; auto p_single_ret_vec = @@ -15555,15 +14804,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 { current_statement__ = 1; auto p_single_ret_vec = @@ -15604,25 +14847,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 { current_statement__ = 1; auto p_single_ret_vec = @@ -15672,11 +14903,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__); @@ -15703,11 +14930,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", @@ -15930,10 +15153,20 @@ stan::math::profile_map& get_stan_profile_data() { return inline_functions_varmat_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -15960,14 +15193,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( @@ -15988,19 +15215,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; @@ -16049,15 +15268,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 { current_statement__ = 1; auto alpha = in__.template read(); @@ -16086,15 +15299,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 { current_statement__ = 1; auto alpha = in__.template read(); @@ -16124,25 +15331,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 { current_statement__ = 1; auto alpha = in__.template read(); @@ -16169,11 +15364,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; @@ -16190,11 +15381,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", @@ -16341,10 +15528,20 @@ stan::math::profile_map& get_stan_profile_data() { return inline_tdata_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -16375,15 +15572,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; @@ -16409,19 +15600,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", @@ -16459,15 +15642,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__); @@ -16495,15 +15672,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__); @@ -16532,25 +15703,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, @@ -16586,11 +15745,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 @@ -16599,11 +15754,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 @@ -16765,10 +15916,20 @@ stan::math::profile_map& get_stan_profile_data() { return inliner_same_names_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -16984,14 +16145,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) { @@ -17014,14 +16169,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) { @@ -17053,16 +16202,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; @@ -17141,15 +16284,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; @@ -17367,15 +16506,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; @@ -17421,19 +16554,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; @@ -17578,15 +16703,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 { current_statement__ = 1; auto mean_phi = @@ -17675,15 +16794,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 { current_statement__ = 1; auto mean_phi = @@ -17773,25 +16886,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 { current_statement__ = 1; auto mean_phi = @@ -18024,11 +17125,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; @@ -18069,11 +17166,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", @@ -18417,10 +17510,20 @@ stan::math::profile_map& get_stan_profile_data() { return inlining_fail2_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -18446,19 +17549,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", @@ -18510,15 +17605,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(); } @@ -18536,15 +17625,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(); } @@ -18563,25 +17646,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__) || @@ -18605,11 +17676,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 @@ -18618,11 +17685,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 @@ -18756,10 +17819,20 @@ stan::math::profile_map& get_stan_profile_data() { return lcm_experiment_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -18783,19 +17856,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 { @@ -18819,15 +17884,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 { current_statement__ = 1; auto x = in__.template read(); @@ -18868,15 +17927,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 { current_statement__ = 1; auto x = in__.template read(); @@ -18918,25 +17971,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 { current_statement__ = 1; auto x = in__.template read(); @@ -18963,11 +18004,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; @@ -18984,11 +18021,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", @@ -19135,10 +18168,20 @@ stan::math::profile_map& get_stan_profile_data() { return lcm_experiment2_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -19161,19 +18204,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", @@ -19219,15 +18254,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 { current_statement__ = 1; auto theta = in__.template read>(J); @@ -19255,15 +18284,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 { current_statement__ = 1; auto theta = in__.template read>(J); @@ -19292,25 +18315,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 { current_statement__ = 1; auto theta = in__.template read>(J); @@ -19337,11 +18348,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__); @@ -19360,11 +18367,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", @@ -19519,10 +18522,20 @@ stan::math::profile_map& get_stan_profile_data() { return lcm_fails_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -19624,14 +18637,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) { @@ -19654,14 +18661,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) { @@ -19694,16 +18695,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); @@ -19758,19 +18753,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; @@ -19896,15 +18883,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 { current_statement__ = 1; auto mean_phi = @@ -20020,15 +19001,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 { current_statement__ = 1; auto mean_phi = @@ -20145,25 +19120,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 { current_statement__ = 1; auto mean_phi = @@ -20252,11 +19215,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; @@ -20277,11 +19236,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", @@ -20492,10 +19447,20 @@ stan::math::profile_map& get_stan_profile_data() { return lcm_fails2_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -20542,11 +19507,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); @@ -20563,11 +19524,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); @@ -20582,11 +19539,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__); @@ -20603,19 +19556,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", @@ -20649,15 +19594,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 { current_statement__ = 1; auto mu = in__.template read(); @@ -20690,15 +19629,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 { current_statement__ = 1; auto mu = in__.template read(); @@ -20732,25 +19665,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 { current_statement__ = 1; auto mu = in__.template read(); @@ -20791,11 +19712,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; @@ -20812,11 +19729,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", @@ -20990,10 +19903,20 @@ stan::math::profile_map& get_stan_profile_data() { return lupdf_inlining_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -21069,19 +19992,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; @@ -21212,15 +20127,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 { current_statement__ = 1; auto alpha_occ = in__.template read(); @@ -21293,15 +20202,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 { current_statement__ = 1; auto alpha_occ = in__.template read(); @@ -21375,25 +20278,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 { current_statement__ = 1; auto alpha_occ = in__.template read(); @@ -21503,11 +20394,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; @@ -21536,11 +20423,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", @@ -21785,10 +20668,20 @@ stan::math::profile_map& get_stan_profile_data() { return off_dce_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -21848,19 +20741,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; @@ -21987,15 +20872,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 { current_statement__ = 1; auto beta = in__.template read(); @@ -22085,15 +20964,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 { current_statement__ = 1; auto beta = in__.template read(); @@ -22184,25 +21057,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 { current_statement__ = 1; auto beta = in__.template read(); @@ -22296,11 +21157,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; @@ -22351,11 +21208,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", @@ -22644,10 +21497,20 @@ stan::math::profile_map& get_stan_profile_data() { return off_small_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -22823,11 +21686,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)) { @@ -22845,14 +21704,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)) { @@ -22870,11 +21723,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); @@ -22893,19 +21742,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 { @@ -22929,15 +21770,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 { current_statement__ = 1; auto theta = in__.template read(); @@ -23219,15 +22054,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 { current_statement__ = 1; auto theta = in__.template read(); @@ -23510,25 +22339,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 { current_statement__ = 1; auto theta = in__.template read(); @@ -23571,11 +22388,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; @@ -23617,11 +22430,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", @@ -23874,10 +22683,20 @@ stan::math::profile_map& get_stan_profile_data() { return optimizations_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -23903,14 +22722,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); @@ -23923,14 +22736,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); @@ -23947,19 +22754,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 { @@ -23983,15 +22782,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__)); @@ -24015,15 +22808,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__)); @@ -24048,25 +22835,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__) || @@ -24090,11 +22865,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 @@ -24103,11 +22874,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 @@ -24241,10 +23008,20 @@ stan::math::profile_map& get_stan_profile_data() { return overloaded_fn_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -24278,15 +23055,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); @@ -24299,11 +23070,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)", @@ -24320,14 +23087,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(); @@ -24344,19 +23105,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 { @@ -24380,15 +23133,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__); @@ -24412,15 +23159,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__); @@ -24445,25 +23186,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__) || @@ -24487,11 +23216,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 @@ -24500,11 +23225,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 @@ -24638,10 +23359,20 @@ stan::math::profile_map& get_stan_profile_data() { return overloaded_fn2_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -24661,19 +23392,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 { @@ -24697,15 +23420,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__, @@ -24739,15 +23456,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__, @@ -24782,25 +23493,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( @@ -24835,11 +23534,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 @@ -24848,11 +23543,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 @@ -25019,10 +23710,20 @@ stan::math::profile_map& get_stan_profile_data() { return partial_eval_tuple_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -25075,19 +23776,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; @@ -25213,15 +23906,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 { current_statement__ = 1; auto a = @@ -25305,15 +23992,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 { current_statement__ = 1; auto a = @@ -25398,25 +24079,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 { current_statement__ = 1; auto a = @@ -25480,11 +24149,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__); @@ -25523,11 +24188,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", @@ -25769,10 +24430,20 @@ stan::math::profile_map& get_stan_profile_data() { return partial_eval_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -25803,19 +24474,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; @@ -25899,15 +24562,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 { current_statement__ = 1; auto m2 = @@ -25965,15 +24622,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 { current_statement__ = 1; auto m2 = @@ -26032,25 +24683,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 { current_statement__ = 1; auto m2 = @@ -26082,11 +24721,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__); @@ -26113,11 +24748,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", @@ -26326,10 +24957,20 @@ stan::math::profile_map& get_stan_profile_data() { return partial_eval_multiply_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -26352,19 +24993,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; @@ -26417,15 +25050,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(); } @@ -26443,15 +25070,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(); } @@ -26470,25 +25091,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__) || @@ -26512,11 +25121,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 @@ -26525,11 +25130,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 @@ -26663,10 +25264,20 @@ stan::math::profile_map& get_stan_profile_data() { return partial_eval_zeros_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -26724,19 +25335,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; @@ -26850,15 +25453,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 { current_statement__ = 1; auto alpha0 = in__.template read(); @@ -26933,15 +25530,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 { current_statement__ = 1; auto alpha0 = in__.template read(); @@ -27017,25 +25608,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 { current_statement__ = 1; auto alpha0 = in__.template read(); @@ -27092,11 +25671,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; @@ -27142,11 +25717,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", @@ -27381,10 +25952,20 @@ stan::math::profile_map& get_stan_profile_data() { return stalled1_failure_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -27410,19 +25991,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; @@ -27460,15 +26033,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 { current_statement__ = 1; auto param = in__.template read(); @@ -27512,15 +26079,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 { current_statement__ = 1; auto param = in__.template read(); @@ -27565,25 +26126,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 { current_statement__ = 1; auto param = in__.template read(); @@ -27635,11 +26184,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; @@ -27656,11 +26201,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", @@ -27831,10 +26372,20 @@ 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 [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -27863,19 +26414,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 { @@ -27899,15 +26442,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 { current_statement__ = 1; auto y = in__.template read(); @@ -27953,15 +26490,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 { current_statement__ = 1; auto y = in__.template read(); @@ -28008,25 +26539,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 { current_statement__ = 1; auto y = in__.template read(); @@ -28083,11 +26602,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; @@ -28104,11 +26619,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", @@ -28284,12 +26795,22 @@ 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. [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -28321,19 +26842,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 { @@ -28357,15 +26870,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(); } @@ -28383,15 +26890,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(); } @@ -28410,25 +26911,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__) || @@ -28479,11 +26968,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 @@ -28492,11 +26977,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 @@ -28642,4 +27123,7 @@ stan::math::profile_map& get_stan_profile_data() { return unroll_limit_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] diff --git a/test/integration/good/compiler-optimizations/cppO1.expected b/test/integration/good/compiler-optimizations/cppO1.expected index 8f7a1108c..03fcb5f6b 100644 --- a/test/integration/good/compiler-optimizations/cppO1.expected +++ b/test/integration/good/compiler-optimizations/cppO1.expected @@ -1,6 +1,13 @@ $ ../../../../../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 "-Wunknown-warning-option" +#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 +35,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 +90,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 { current_statement__ = 1; auto X_p = @@ -153,15 +146,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 { current_statement__ = 1; auto X_p = @@ -217,25 +204,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 { current_statement__ = 1; auto X_p = @@ -315,11 +290,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 +309,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", @@ -630,10 +597,20 @@ 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 [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -766,14 +743,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__); @@ -830,19 +801,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", @@ -925,15 +888,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 { current_statement__ = 1; auto beta = @@ -1025,15 +982,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 { current_statement__ = 1; auto beta = @@ -1126,25 +1077,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 { current_statement__ = 1; auto beta = @@ -1213,11 +1152,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; @@ -1246,11 +1181,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", @@ -1450,6 +1381,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: @@ -1458,6 +1392,13 @@ 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 "-Wunknown-warning-option" +#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; @@ -1479,19 +1420,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; @@ -1542,15 +1475,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 { current_statement__ = 1; auto X_p = @@ -1585,15 +1512,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 { current_statement__ = 1; auto X_p = @@ -1630,25 +1551,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 { current_statement__ = 1; auto X_p = @@ -1694,11 +1603,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; @@ -1717,11 +1622,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", @@ -1936,10 +1837,20 @@ stan::math::profile_map& get_stan_profile_data() { return ad_levels_deep_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -1973,19 +1884,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", @@ -2025,15 +1928,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 { current_statement__ = 1; auto X = @@ -2095,15 +1992,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 { current_statement__ = 1; auto X = @@ -2166,25 +2057,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 { current_statement__ = 1; auto X = @@ -2212,11 +2091,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; @@ -2235,11 +2110,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", @@ -2412,10 +2283,20 @@ stan::math::profile_map& get_stan_profile_data() { return copy_prop_profile_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -2521,14 +2402,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) { @@ -2551,14 +2426,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) { @@ -2591,16 +2460,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); @@ -2658,19 +2521,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; @@ -2836,15 +2691,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 { current_statement__ = 1; auto mean_p = @@ -3024,15 +2873,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 { current_statement__ = 1; auto mean_p = @@ -3213,25 +3056,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 { current_statement__ = 1; auto mean_p = @@ -3382,11 +3213,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; @@ -3409,11 +3236,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", @@ -3642,10 +3465,20 @@ stan::math::profile_map& get_stan_profile_data() { return copy_fail_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -3739,19 +3572,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; @@ -3939,15 +3764,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 { current_statement__ = 1; auto sigma = @@ -4116,15 +3935,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 { current_statement__ = 1; auto sigma = @@ -4294,25 +4107,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 { current_statement__ = 1; auto sigma = @@ -4402,11 +4203,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; @@ -4493,11 +4290,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", @@ -4889,10 +4682,20 @@ stan::math::profile_map& get_stan_profile_data() { return dce_fail_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -4921,19 +4724,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", @@ -4985,15 +4780,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(); } @@ -5011,15 +4800,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(); } @@ -5038,25 +4821,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__) || @@ -5080,11 +4851,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 @@ -5093,11 +4860,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 @@ -5231,10 +4994,20 @@ stan::math::profile_map& get_stan_profile_data() { return expr_prop_experiment_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -5260,19 +5033,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", @@ -5323,15 +5088,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(); } @@ -5349,15 +5108,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(); } @@ -5376,25 +5129,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__) || @@ -5418,11 +5159,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 @@ -5431,11 +5168,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 @@ -5569,10 +5302,20 @@ stan::math::profile_map& get_stan_profile_data() { return expr_prop_experiment2_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -5601,19 +5344,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; @@ -5670,15 +5405,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 { current_statement__ = 1; auto mu = @@ -5739,15 +5468,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 { current_statement__ = 1; auto mu = @@ -5809,25 +5532,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 { current_statement__ = 1; auto mu = @@ -5866,11 +5577,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; @@ -5898,11 +5605,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", @@ -6095,10 +5798,20 @@ stan::math::profile_map& get_stan_profile_data() { return expr_prop_fail_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -6127,19 +5840,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", @@ -6196,15 +5901,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 { current_statement__ = 1; auto mu = in__.template read(); @@ -6240,15 +5939,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 { current_statement__ = 1; auto mu = in__.template read(); @@ -6285,25 +5978,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 { current_statement__ = 1; auto mu = in__.template read(); @@ -6338,11 +6019,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; @@ -6368,11 +6045,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", @@ -6546,10 +6219,20 @@ stan::math::profile_map& get_stan_profile_data() { return expr_prop_fail2_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -6633,19 +6316,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; @@ -6882,15 +6557,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 { current_statement__ = 1; auto a = @@ -7015,15 +6684,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 { current_statement__ = 1; auto a = @@ -7149,25 +6812,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 { current_statement__ = 1; auto a = @@ -7293,11 +6944,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; @@ -7366,11 +7013,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", @@ -7739,10 +7382,20 @@ stan::math::profile_map& get_stan_profile_data() { return expr_prop_fail3_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -7811,19 +7464,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; @@ -7941,15 +7586,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 { current_statement__ = 1; auto tau_phi = @@ -8007,15 +7646,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 { current_statement__ = 1; auto tau_phi = @@ -8076,25 +7709,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 { current_statement__ = 1; auto tau_phi = @@ -8215,11 +7836,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; @@ -8242,11 +7859,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", @@ -8505,10 +8118,20 @@ stan::math::profile_map& get_stan_profile_data() { return expr_prop_fail4_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -8619,14 +8242,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) { @@ -8649,14 +8266,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) { @@ -8689,16 +8300,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); @@ -8754,19 +8359,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; @@ -8894,15 +8491,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 { current_statement__ = 1; auto mean_phi = @@ -9094,15 +8685,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 { current_statement__ = 1; auto mean_phi = @@ -9295,25 +8880,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 { current_statement__ = 1; auto mean_phi = @@ -9483,11 +9056,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; @@ -9518,11 +9087,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", @@ -9786,10 +9351,20 @@ stan::math::profile_map& get_stan_profile_data() { return expr_prop_fail5_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -10001,14 +9576,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) { @@ -10031,14 +9600,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) { @@ -10070,16 +9633,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; @@ -10161,15 +9718,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; @@ -10387,19 +9940,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; @@ -10542,15 +10087,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 { current_statement__ = 1; auto mean_phi = @@ -10987,15 +10526,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 { current_statement__ = 1; auto mean_phi = @@ -11433,25 +10966,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 { current_statement__ = 1; auto mean_phi = @@ -11809,11 +11330,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; @@ -11854,11 +11371,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", @@ -12213,10 +11726,20 @@ stan::math::profile_map& get_stan_profile_data() { return expr_prop_fail6_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -12276,19 +11799,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; @@ -12429,15 +11944,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 { current_statement__ = 1; auto pi = @@ -12511,15 +12020,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 { current_statement__ = 1; auto pi = @@ -12595,25 +12098,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 { current_statement__ = 1; auto pi = @@ -12692,11 +12183,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; @@ -12731,11 +12218,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", @@ -12971,10 +12454,20 @@ stan::math::profile_map& get_stan_profile_data() { return expr_prop_fail7_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -13020,19 +12513,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; @@ -13137,15 +12622,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 { current_statement__ = 1; auto beta0 = in__.template read(); @@ -13206,15 +12685,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 { current_statement__ = 1; auto beta0 = in__.template read(); @@ -13280,25 +12753,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 { current_statement__ = 1; auto beta0 = in__.template read(); @@ -13366,11 +12827,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; @@ -13411,11 +12868,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", @@ -13668,10 +13121,20 @@ stan::math::profile_map& get_stan_profile_data() { return expr_prop_fail8_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -13777,14 +13240,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) { @@ -13807,14 +13264,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) { @@ -13847,16 +13298,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); @@ -13914,19 +13359,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; @@ -14092,15 +13529,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 { current_statement__ = 1; auto mean_p = @@ -14280,15 +13711,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 { current_statement__ = 1; auto mean_p = @@ -14469,25 +13894,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 { current_statement__ = 1; auto mean_p = @@ -14638,11 +14051,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; @@ -14665,11 +14074,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", @@ -14898,10 +14303,20 @@ stan::math::profile_map& get_stan_profile_data() { return fails_test_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -14933,12 +14348,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); @@ -14954,12 +14365,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__); @@ -14978,19 +14385,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; @@ -15038,15 +14437,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__; @@ -15082,15 +14475,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__; @@ -15127,25 +14514,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__) || @@ -15169,11 +14544,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 @@ -15182,11 +14553,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 @@ -15320,10 +14687,20 @@ 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 [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -15363,14 +14740,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; @@ -15386,15 +14757,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; @@ -15425,19 +14790,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", @@ -15471,15 +14828,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); @@ -15541,15 +14892,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); @@ -15612,25 +14957,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__) || @@ -15654,11 +14987,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 @@ -15667,11 +14996,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 @@ -15805,10 +15130,20 @@ 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 [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -15828,19 +15163,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 { @@ -15864,15 +15191,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()); @@ -15909,15 +15230,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()); @@ -15955,25 +15270,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__) || @@ -15997,11 +15300,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 @@ -16010,11 +15309,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 @@ -16148,6 +15443,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 @@ -16166,6 +15464,13 @@ 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 "-Wunknown-warning-option" +#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; @@ -16188,19 +15493,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 { @@ -16224,15 +15521,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 { current_statement__ = 1; auto y = in__.template read>(3); @@ -16276,15 +15567,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 { current_statement__ = 1; auto y = @@ -16332,25 +15617,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 { current_statement__ = 1; auto y = in__.template read>(3); @@ -16397,11 +15670,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; @@ -16433,11 +15702,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", @@ -16657,10 +15922,20 @@ stan::math::profile_map& get_stan_profile_data() { return initialize_SoA_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -16698,15 +15973,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; @@ -16722,15 +15991,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__); @@ -16756,19 +16019,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 { @@ -16792,15 +16047,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 { current_statement__ = 1; auto p_single_ret_vec = @@ -16862,15 +16111,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 { current_statement__ = 1; auto p_single_ret_vec = @@ -16942,25 +16185,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 { current_statement__ = 1; auto p_single_ret_vec = @@ -17030,11 +16261,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; @@ -17059,11 +16286,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", @@ -17285,10 +16508,20 @@ stan::math::profile_map& get_stan_profile_data() { return inline_functions_varmat_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -17315,14 +16548,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( @@ -17343,19 +16570,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; @@ -17405,15 +16624,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 { current_statement__ = 1; auto alpha = in__.template read(); @@ -17442,15 +16655,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 { current_statement__ = 1; auto alpha = in__.template read(); @@ -17480,25 +16687,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 { current_statement__ = 1; auto alpha = in__.template read(); @@ -17525,11 +16720,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; @@ -17546,11 +16737,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", @@ -17697,10 +16884,20 @@ stan::math::profile_map& get_stan_profile_data() { return inline_tdata_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -17730,15 +16927,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; @@ -17763,19 +16954,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", @@ -17813,15 +16996,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__); @@ -17860,15 +17037,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, @@ -17915,25 +17086,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, @@ -17980,11 +17139,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 @@ -17993,11 +17148,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 @@ -18159,10 +17310,20 @@ stan::math::profile_map& get_stan_profile_data() { return inliner_same_names_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -18377,14 +17538,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) { @@ -18407,14 +17562,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) { @@ -18446,16 +17595,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; @@ -18535,15 +17678,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; @@ -18757,15 +17896,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; @@ -18811,19 +17944,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; @@ -18968,15 +18093,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 { current_statement__ = 1; auto mean_phi = @@ -19379,15 +18498,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 { current_statement__ = 1; auto mean_phi = @@ -19791,25 +18904,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 { current_statement__ = 1; auto mean_phi = @@ -20160,11 +19261,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; @@ -20201,11 +19298,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", @@ -20549,10 +19642,20 @@ stan::math::profile_map& get_stan_profile_data() { return inlining_fail2_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -20578,19 +19681,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", @@ -20642,15 +19737,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(); } @@ -20668,15 +19757,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(); } @@ -20695,25 +19778,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__) || @@ -20737,11 +19808,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 @@ -20750,11 +19817,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 @@ -20888,10 +19951,20 @@ stan::math::profile_map& get_stan_profile_data() { return lcm_experiment_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -20915,19 +19988,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 { @@ -20951,15 +20016,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 { current_statement__ = 1; auto x = in__.template read(); @@ -20999,15 +20058,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 { current_statement__ = 1; auto x = in__.template read(); @@ -21048,25 +20101,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 { current_statement__ = 1; auto x = in__.template read(); @@ -21093,11 +20134,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; @@ -21114,11 +20151,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", @@ -21265,10 +20298,20 @@ stan::math::profile_map& get_stan_profile_data() { return lcm_experiment2_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -21291,19 +20334,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", @@ -21349,15 +20384,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 { current_statement__ = 1; auto theta = in__.template read>(J); @@ -21385,15 +20414,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 { current_statement__ = 1; auto theta = in__.template read>(J); @@ -21422,25 +20445,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 { current_statement__ = 1; auto theta = in__.template read>(J); @@ -21467,11 +20478,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; @@ -21489,11 +20496,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", @@ -21648,10 +20651,20 @@ stan::math::profile_map& get_stan_profile_data() { return lcm_fails_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -21752,14 +20765,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) { @@ -21782,14 +20789,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) { @@ -21822,16 +20823,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); @@ -21887,19 +20882,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; @@ -22025,15 +21012,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 { current_statement__ = 1; auto mean_phi = @@ -22208,15 +21189,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 { current_statement__ = 1; auto mean_phi = @@ -22392,25 +21367,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 { current_statement__ = 1; auto mean_phi = @@ -22556,11 +21519,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; @@ -22581,11 +21540,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", @@ -22796,10 +21751,20 @@ stan::math::profile_map& get_stan_profile_data() { return lcm_fails2_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -22845,11 +21810,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); @@ -22866,11 +21827,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); @@ -22885,11 +21842,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__); @@ -22906,19 +21859,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", @@ -22952,15 +21897,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 { current_statement__ = 1; auto mu = in__.template read(); @@ -23015,15 +21954,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 { current_statement__ = 1; auto mu = in__.template read(); @@ -23079,25 +22012,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 { current_statement__ = 1; auto mu = in__.template read(); @@ -23159,11 +22080,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; @@ -23180,11 +22097,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", @@ -23358,10 +22271,20 @@ stan::math::profile_map& get_stan_profile_data() { return lupdf_inlining_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -23437,19 +22360,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; @@ -23580,15 +22495,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 { current_statement__ = 1; auto alpha_occ = in__.template read(); @@ -23659,15 +22568,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 { current_statement__ = 1; auto alpha_occ = in__.template read(); @@ -23739,25 +22642,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 { current_statement__ = 1; auto alpha_occ = in__.template read(); @@ -23863,11 +22754,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; @@ -23896,11 +22783,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", @@ -24145,10 +23028,20 @@ stan::math::profile_map& get_stan_profile_data() { return off_dce_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -24208,19 +23101,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; @@ -24347,15 +23232,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 { current_statement__ = 1; auto beta = in__.template read(); @@ -24447,15 +23326,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 { current_statement__ = 1; auto beta = in__.template read(); @@ -24548,25 +23421,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 { current_statement__ = 1; auto beta = in__.template read(); @@ -24662,11 +23523,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; @@ -24715,11 +23572,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", @@ -25008,10 +23861,20 @@ stan::math::profile_map& get_stan_profile_data() { return off_small_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -25139,11 +24002,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)) { @@ -25161,14 +24020,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)) { @@ -25186,11 +24039,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); @@ -25209,19 +24058,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 { @@ -25245,15 +24086,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 { current_statement__ = 1; auto theta = in__.template read(); @@ -25573,15 +24408,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 { current_statement__ = 1; auto theta = in__.template read(); @@ -25905,25 +24734,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 { current_statement__ = 1; auto theta = in__.template read(); @@ -25966,11 +24783,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; @@ -26009,11 +24822,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", @@ -26265,10 +25074,20 @@ stan::math::profile_map& get_stan_profile_data() { return optimizations_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -26294,14 +25113,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); @@ -26314,14 +25127,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); @@ -26338,19 +25145,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 { @@ -26374,15 +25173,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__)); @@ -26406,15 +25199,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__)); @@ -26439,25 +25226,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__) || @@ -26481,11 +25256,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 @@ -26494,11 +25265,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 @@ -26632,10 +25399,20 @@ stan::math::profile_map& get_stan_profile_data() { return overloaded_fn_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -26669,15 +25446,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); @@ -26690,11 +25461,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)", @@ -26711,14 +25478,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(); @@ -26735,19 +25496,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 { @@ -26771,15 +25524,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)", @@ -26804,15 +25551,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)", @@ -26838,25 +25579,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__) || @@ -26880,11 +25609,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 @@ -26893,11 +25618,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 @@ -27031,10 +25752,20 @@ stan::math::profile_map& get_stan_profile_data() { return overloaded_fn2_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -27054,19 +25785,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 { @@ -27090,15 +25813,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; @@ -27129,15 +25846,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; @@ -27169,25 +25880,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( @@ -27222,11 +25921,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 @@ -27235,11 +25930,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 @@ -27406,10 +26097,20 @@ stan::math::profile_map& get_stan_profile_data() { return partial_eval_tuple_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -27461,19 +26162,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; @@ -27599,15 +26292,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 { current_statement__ = 1; auto a = @@ -27690,15 +26377,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 { current_statement__ = 1; auto a = @@ -27782,25 +26463,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 { current_statement__ = 1; auto a = @@ -27867,11 +26536,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; @@ -27908,11 +26573,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", @@ -28154,10 +26815,20 @@ stan::math::profile_map& get_stan_profile_data() { return partial_eval_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -28188,19 +26859,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; @@ -28284,15 +26947,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 { current_statement__ = 1; auto m2 = @@ -28342,15 +26999,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 { current_statement__ = 1; auto m2 = @@ -28403,25 +27054,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 { current_statement__ = 1; auto m2 = @@ -28453,11 +27092,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; @@ -28482,11 +27117,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", @@ -28695,10 +27326,20 @@ stan::math::profile_map& get_stan_profile_data() { return partial_eval_multiply_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -28721,19 +27362,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; @@ -28786,15 +27419,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(); } @@ -28812,15 +27439,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(); } @@ -28839,25 +27460,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__) || @@ -28881,11 +27490,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 @@ -28894,11 +27499,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 @@ -29032,10 +27633,20 @@ stan::math::profile_map& get_stan_profile_data() { return partial_eval_zeros_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -29093,19 +27704,11 @@ class stalled1_failure_model final : public model_base_crtp::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; try { int pos__; pos__ = 1; @@ -29219,15 +27822,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 { current_statement__ = 1; auto alpha0 = in__.template read(); @@ -29305,15 +27902,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 { current_statement__ = 1; auto alpha0 = in__.template read(); @@ -29393,25 +27984,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 { current_statement__ = 1; auto alpha0 = in__.template read(); @@ -29468,11 +28047,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; @@ -29518,11 +28093,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", @@ -29757,10 +28328,20 @@ stan::math::profile_map& get_stan_profile_data() { return stalled1_failure_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -29786,19 +28367,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; @@ -29836,15 +28409,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 { current_statement__ = 1; auto param = in__.template read(); @@ -29886,15 +28453,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 { current_statement__ = 1; auto param = in__.template read(); @@ -29937,25 +28498,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 { current_statement__ = 1; auto param = in__.template read(); @@ -30007,11 +28556,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; @@ -30028,11 +28573,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", @@ -30203,10 +28744,20 @@ 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 [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -30234,19 +28785,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 { @@ -30270,15 +28813,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 { current_statement__ = 1; auto y = in__.template read(); @@ -30323,15 +28860,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 { current_statement__ = 1; auto y = in__.template read(); @@ -30377,25 +28908,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 { current_statement__ = 1; auto y = in__.template read(); @@ -30451,11 +28970,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; @@ -30472,11 +28987,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", @@ -30652,12 +29163,22 @@ 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. [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -30689,19 +29210,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 { @@ -30725,15 +29238,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(); } @@ -30751,15 +29258,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(); } @@ -30778,25 +29279,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__) || @@ -30847,11 +29336,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 @@ -30860,11 +29345,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 @@ -31010,4 +29491,7 @@ stan::math::profile_map& get_stan_profile_data() { return unroll_limit_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] diff --git a/test/integration/good/compiler-optimizations/mem_patterns/cpp.expected b/test/integration/good/compiler-optimizations/mem_patterns/cpp.expected index c61772fe1..8bac44ff3 100644 --- a/test/integration/good/compiler-optimizations/mem_patterns/cpp.expected +++ b/test/integration/good/compiler-optimizations/mem_patterns/cpp.expected @@ -1,6 +1,13 @@ $ ../../../../../../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 "-Wunknown-warning-option" +#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 +68,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 +155,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 { current_statement__ = 1; auto alpha = in__.template read(); @@ -318,15 +311,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 { current_statement__ = 1; auto alpha = in__.template read(); @@ -504,25 +491,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 { current_statement__ = 1; auto alpha = in__.template read(); @@ -555,11 +530,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; @@ -587,11 +558,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", @@ -776,10 +743,20 @@ 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 [exit 0] $ ../../../../../../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 "-Wunknown-warning-option" +#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; @@ -797,19 +774,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 { @@ -833,15 +802,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 { current_statement__ = 1; auto A_p = @@ -872,15 +835,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 { current_statement__ = 1; auto A_p = @@ -912,25 +869,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 { current_statement__ = 1; auto A_p = @@ -968,11 +913,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__); @@ -992,11 +933,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", @@ -1205,10 +1142,20 @@ stan::math::profile_map& get_stan_profile_data() { return complex_fails_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../../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 "-Wunknown-warning-option" +#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; @@ -1331,19 +1278,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; @@ -1592,15 +1531,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 { current_statement__ = 1; auto high_low_est = @@ -1863,15 +1796,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 { current_statement__ = 1; auto high_low_est = @@ -2165,25 +2092,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 { current_statement__ = 1; auto high_low_est = @@ -2455,11 +2370,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__); @@ -2613,11 +2524,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", @@ -3384,10 +3291,20 @@ stan::math::profile_map& get_stan_profile_data() { return constraints_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../../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 "-Wunknown-warning-option" +#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; @@ -3416,19 +3333,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 { @@ -3452,15 +3361,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 { current_statement__ = 1; auto X_p = @@ -3532,15 +3435,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 { current_statement__ = 1; auto X_p = @@ -3613,25 +3510,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 { current_statement__ = 1; auto X_p = @@ -3722,11 +3607,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__); @@ -3746,11 +3627,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", @@ -4038,10 +3915,20 @@ stan::math::profile_map& get_stan_profile_data() { return deep_dependence_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../../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 "-Wunknown-warning-option" +#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; @@ -4176,14 +4063,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; @@ -4199,15 +4080,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; @@ -4230,19 +4105,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; @@ -4428,15 +4295,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 { current_statement__ = 1; auto alpha = in__.template read(); @@ -4791,15 +4652,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 { current_statement__ = 1; auto alpha = in__.template read(); @@ -5178,25 +5033,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 { current_statement__ = 1; auto alpha = in__.template read(); @@ -5360,11 +5203,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; @@ -5531,11 +5370,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", @@ -6426,10 +6261,20 @@ stan::math::profile_map& get_stan_profile_data() { return indexing_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../../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 "-Wunknown-warning-option" +#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; @@ -6463,19 +6308,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", @@ -6523,15 +6360,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 { current_statement__ = 1; auto alpha = in__.template read(); @@ -6596,15 +6427,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 { current_statement__ = 1; auto alpha = in__.template read(); @@ -6675,25 +6500,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 { current_statement__ = 1; auto alpha = in__.template read(); @@ -6724,11 +6537,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; @@ -6752,11 +6561,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", @@ -6934,10 +6739,20 @@ stan::math::profile_map& get_stan_profile_data() { return indexing2_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../../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 "-Wunknown-warning-option" +#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; @@ -6976,15 +6791,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; @@ -7004,15 +6813,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); @@ -7029,19 +6832,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", @@ -7075,15 +6870,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 { current_statement__ = 1; auto soa_x = @@ -7135,15 +6924,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 { current_statement__ = 1; auto soa_x = @@ -7197,25 +6980,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 { current_statement__ = 1; auto soa_x = @@ -7279,11 +7050,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__); @@ -7317,11 +7084,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", @@ -7610,10 +7373,20 @@ stan::math::profile_map& get_stan_profile_data() { return reductions_allowed_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../../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 "-Wunknown-warning-option" +#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; @@ -7642,14 +7415,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__); @@ -7667,15 +7434,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; @@ -7693,19 +7454,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 { @@ -7729,15 +7482,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 { current_statement__ = 1; auto row_soa = @@ -7796,15 +7543,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 { current_statement__ = 1; auto row_soa = @@ -7865,25 +7606,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 { current_statement__ = 1; auto row_soa = @@ -7958,11 +7687,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__); @@ -7989,11 +7714,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", @@ -8290,10 +8011,20 @@ 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 [exit 0] $ ../../../../../../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 "-Wunknown-warning-option" +#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; @@ -8316,19 +8047,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 { @@ -8352,15 +8075,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 { current_statement__ = 1; auto aos_p = @@ -8412,15 +8129,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 { current_statement__ = 1; auto aos_p = @@ -8480,25 +8191,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 { current_statement__ = 1; auto aos_p = @@ -8558,11 +8257,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__); @@ -8589,11 +8284,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", @@ -8814,10 +8505,20 @@ stan::math::profile_map& get_stan_profile_data() { return single_indexing_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../../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 "-Wunknown-warning-option" +#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; @@ -8854,15 +8555,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; @@ -8882,15 +8577,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); @@ -8907,19 +8596,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", @@ -8953,15 +8634,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 { current_statement__ = 1; auto first_pass_soa_x = @@ -8997,15 +8672,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 { current_statement__ = 1; auto first_pass_soa_x = @@ -9042,25 +8711,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 { current_statement__ = 1; auto first_pass_soa_x = @@ -9104,11 +8761,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__); @@ -9135,11 +8788,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", @@ -9373,10 +9022,20 @@ stan::math::profile_map& get_stan_profile_data() { return tp_reused_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../../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 "-Wunknown-warning-option" +#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; @@ -9401,19 +9060,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); @@ -9455,15 +9106,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, @@ -9512,15 +9157,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, @@ -9570,25 +9209,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 = @@ -9658,11 +9285,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, @@ -9709,11 +9332,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", @@ -9996,10 +9615,20 @@ stan::math::profile_map& get_stan_profile_data() { return tuple_test_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../../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 "-Wunknown-warning-option" +#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; @@ -10021,19 +9650,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; @@ -10083,15 +9704,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 { current_statement__ = 1; auto m1 = @@ -10143,15 +9758,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 { current_statement__ = 1; auto m1 = @@ -10204,25 +9813,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 { current_statement__ = 1; auto m1 = @@ -10254,11 +9851,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__); @@ -10285,11 +9878,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", @@ -10497,4 +10086,7 @@ stan::math::profile_map& get_stan_profile_data() { return tuple_test2_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] diff --git a/test/integration/good/tuples/cpp.expected b/test/integration/good/tuples/cpp.expected index 87b8ebae8..4f3e56c9b 100644 --- a/test/integration/good/tuples/cpp.expected +++ b/test/integration/good/tuples/cpp.expected @@ -1,6 +1,13 @@ $ ../../../../../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 "-Wunknown-warning-option" +#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 +58,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 +679,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 +925,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 +1172,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 +1487,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 +1787,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", @@ -2926,10 +2893,20 @@ stan::math::profile_map& get_stan_profile_data() { return arrays_tuples_nested_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -2959,19 +2936,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(); @@ -3065,15 +3034,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(); } @@ -3091,15 +3054,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(); } @@ -3118,25 +3075,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__) || @@ -3160,11 +3105,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 @@ -3173,11 +3114,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 @@ -3311,10 +3248,20 @@ stan::math::profile_map& get_stan_profile_data() { return basic_unpacking_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -3332,19 +3279,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 { @@ -3368,15 +3307,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 { current_statement__ = 1; auto x = in__.template read(); @@ -3412,15 +3345,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 { current_statement__ = 1; auto x = in__.template read(); @@ -3457,25 +3384,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 { current_statement__ = 1; auto x = in__.template read(); @@ -3502,11 +3417,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; @@ -3523,11 +3434,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 +3581,20 @@ stan::math::profile_map& get_stan_profile_data() { return infer_tuple_ad_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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 +3620,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 +3696,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 +3753,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 +3811,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 +3841,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 +3850,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 @@ -4107,10 +3984,20 @@ stan::math::profile_map& get_stan_profile_data() { return nested_unpacking_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -4141,19 +4028,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", @@ -4201,15 +4080,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 { current_statement__ = 1; auto A = @@ -4262,15 +4135,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 { current_statement__ = 1; auto A = @@ -4324,25 +4191,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 { current_statement__ = 1; auto A = @@ -4370,11 +4225,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__); @@ -4394,11 +4245,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", @@ -4572,10 +4419,20 @@ stan::math::profile_map& get_stan_profile_data() { return qr_unpack_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -4593,19 +4450,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; @@ -4646,15 +4495,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(); } @@ -4672,15 +4515,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(); } @@ -4699,25 +4536,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__) || @@ -4741,11 +4566,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 @@ -4754,11 +4575,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 @@ -4892,10 +4709,20 @@ stan::math::profile_map& get_stan_profile_data() { return simple_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -4913,19 +4740,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; @@ -4971,15 +4790,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(); } @@ -4997,15 +4810,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(); } @@ -5024,25 +4831,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__) || @@ -5066,11 +4861,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 @@ -5079,11 +4870,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 +5004,20 @@ stan::math::profile_map& get_stan_profile_data() { return simple2_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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 +5035,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 +5100,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 +5120,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 +5141,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 +5171,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 +5180,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 @@ -5557,10 +5314,20 @@ stan::math::profile_map& get_stan_profile_data() { return simple3_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -5581,19 +5348,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; @@ -5745,15 +5504,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(); } @@ -5771,15 +5524,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(); } @@ -5798,25 +5545,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__) || @@ -5840,11 +5575,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 @@ -5853,11 +5584,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 @@ -5991,10 +5718,20 @@ stan::math::profile_map& get_stan_profile_data() { return tuple_constraints_data_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -6015,14 +5752,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); @@ -6041,19 +5772,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", @@ -6105,15 +5828,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__, @@ -6226,15 +5943,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__, @@ -6348,25 +6059,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(), @@ -6497,11 +6196,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__, @@ -6627,11 +6322,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", @@ -7139,10 +6830,20 @@ stan::math::profile_map& get_stan_profile_data() { return tuple_constraints_params_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -7170,14 +6871,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); @@ -7190,14 +6885,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))); @@ -7212,14 +6901,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( @@ -7241,19 +6924,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; @@ -7293,15 +6968,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__)); @@ -7348,15 +7017,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__)); @@ -7404,25 +7067,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__) || @@ -7446,11 +7097,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 @@ -7459,11 +7106,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 @@ -7597,10 +7240,20 @@ stan::math::profile_map& get_stan_profile_data() { return tuple_dataonly_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -7619,14 +7272,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", @@ -7644,19 +7291,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 { @@ -7680,15 +7319,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__) { @@ -7718,15 +7351,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__) { @@ -7757,25 +7384,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__) || @@ -7799,11 +7414,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 @@ -7812,11 +7423,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 @@ -7950,10 +7557,20 @@ stan::math::profile_map& get_stan_profile_data() { return tuple_dataonly2_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -7971,19 +7588,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; @@ -8024,15 +7633,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(); } @@ -8050,15 +7653,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(); } @@ -8077,25 +7674,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__) || @@ -8119,11 +7704,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 @@ -8132,11 +7713,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 @@ -8270,10 +7847,20 @@ stan::math::profile_map& get_stan_profile_data() { return tuple_foreach_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -8293,19 +7880,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; @@ -8357,15 +7936,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__, @@ -8407,15 +7980,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__, @@ -8458,25 +8025,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(), @@ -8511,11 +8066,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__, @@ -8537,11 +8088,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", @@ -8703,10 +8250,20 @@ stan::math::profile_map& get_stan_profile_data() { return tuple_full_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -8724,19 +8281,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; @@ -8771,15 +8320,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(); } @@ -8797,15 +8340,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(); } @@ -8824,25 +8361,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__) || @@ -8866,11 +8391,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 @@ -8879,11 +8400,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 @@ -9017,10 +8534,20 @@ stan::math::profile_map& get_stan_profile_data() { return tuple_ix_assign_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -9038,19 +8565,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; @@ -9087,15 +8606,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(); } @@ -9113,15 +8626,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(); } @@ -9140,25 +8647,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__) || @@ -9182,11 +8677,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 @@ -9195,11 +8686,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 @@ -9333,10 +8820,20 @@ stan::math::profile_map& get_stan_profile_data() { return tuple_ix_assign2_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -9354,19 +8851,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; @@ -9402,15 +8891,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(); } @@ -9428,15 +8911,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(); } @@ -9455,25 +8932,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__) || @@ -9497,11 +8962,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 @@ -9510,11 +8971,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 @@ -9648,10 +9105,20 @@ stan::math::profile_map& get_stan_profile_data() { return tuple_ix_assign3_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -9669,19 +9136,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; @@ -9721,15 +9180,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(); } @@ -9747,15 +9200,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(); } @@ -9774,25 +9221,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__) || @@ -9816,11 +9251,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 @@ -9829,11 +9260,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 @@ -9967,10 +9394,20 @@ stan::math::profile_map& get_stan_profile_data() { return tuple_ix_assign4_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -9988,19 +9425,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 { @@ -10024,15 +9453,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__, @@ -10077,15 +9500,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__, @@ -10131,25 +9548,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(), @@ -10201,11 +9606,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__, @@ -10246,11 +9647,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", @@ -10474,10 +9871,20 @@ stan::math::profile_map& get_stan_profile_data() { return tuple_nested_param_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -10494,19 +9901,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 { @@ -10530,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__, @@ -10568,15 +9961,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__, @@ -10607,25 +9994,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(), @@ -10659,11 +10034,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__, @@ -10685,11 +10056,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", @@ -10851,10 +10218,20 @@ stan::math::profile_map& get_stan_profile_data() { return tuple_params_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -10912,14 +10289,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)) + @@ -10946,19 +10317,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; @@ -11079,15 +10442,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 = @@ -11199,15 +10556,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 = @@ -11320,25 +10671,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 = @@ -11530,11 +10869,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 @@ -11543,11 +10878,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 @@ -11906,10 +11237,20 @@ stan::math::profile_map& get_stan_profile_data() { return tuple_promotion_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -11996,14 +11337,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__) { @@ -12027,14 +11362,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)); @@ -12052,14 +11381,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__) { @@ -12082,14 +11405,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__) { @@ -12126,14 +11443,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__) { @@ -12159,19 +11470,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; @@ -12273,15 +11576,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(); } @@ -12299,15 +11596,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(); } @@ -12326,25 +11617,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__) || @@ -12414,11 +11693,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 @@ -12427,11 +11702,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 @@ -12577,10 +11848,20 @@ stan::math::profile_map& get_stan_profile_data() { return tuple_templating_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -12652,14 +11933,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__) { @@ -12690,14 +11965,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__) { @@ -12736,14 +12005,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__) { @@ -12776,19 +12039,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; @@ -12852,15 +12107,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 { current_statement__ = 1; auto m1 = @@ -12956,15 +12205,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 { current_statement__ = 1; auto m1 = @@ -13061,25 +12304,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 { current_statement__ = 1; auto m1 = @@ -13111,11 +12342,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__); @@ -13142,11 +12369,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", @@ -13354,10 +12577,20 @@ stan::math::profile_map& get_stan_profile_data() { return tuple_copying_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -13380,19 +12613,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 { @@ -13416,15 +12641,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(); } @@ -13442,15 +12661,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(); } @@ -13469,25 +12682,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__) || @@ -13549,11 +12750,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 @@ -13562,11 +12759,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 @@ -13736,10 +12929,20 @@ stan::math::profile_map& get_stan_profile_data() { return tuple_exprs_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -13811,14 +13014,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)); @@ -13838,19 +13035,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; @@ -13915,15 +13104,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 { current_statement__ = 1; auto param_y = in__.template read>(N); @@ -13951,15 +13134,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 { current_statement__ = 1; auto param_y = in__.template read>(N); @@ -13988,25 +13165,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 { current_statement__ = 1; auto param_y = in__.template read>(N); @@ -14040,11 +13205,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__); @@ -14064,11 +13225,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", @@ -14235,10 +13392,20 @@ stan::math::profile_map& get_stan_profile_data() { return tuple_hof_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -14284,11 +13451,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; @@ -14305,19 +13468,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 { @@ -14341,15 +13496,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), @@ -14375,15 +13524,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), @@ -14410,25 +13553,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__) || @@ -14452,11 +13583,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 @@ -14465,11 +13592,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 @@ -14603,10 +13726,20 @@ stan::math::profile_map& get_stan_profile_data() { return tuple_lpdf_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -14631,11 +13764,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; @@ -14652,19 +13781,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 { @@ -14688,15 +13809,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), @@ -14721,15 +13836,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), @@ -14755,25 +13864,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__) || @@ -14797,11 +13894,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 @@ -14810,11 +13903,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 @@ -14948,10 +14037,20 @@ stan::math::profile_map& get_stan_profile_data() { return tuple_lpdf2_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -14980,11 +14079,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)); @@ -15001,19 +14096,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 { @@ -15037,15 +14124,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, @@ -15070,15 +14151,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, @@ -15104,25 +14179,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__) || @@ -15146,11 +14209,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 @@ -15159,11 +14218,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 @@ -15297,10 +14352,20 @@ stan::math::profile_map& get_stan_profile_data() { return tuple_lpmf_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -15325,19 +14390,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); @@ -15377,15 +14434,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(); } @@ -15403,15 +14454,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(); } @@ -15430,25 +14475,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__) || @@ -15504,11 +14537,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 @@ -15517,11 +14546,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 @@ -15721,10 +14746,20 @@ stan::math::profile_map& get_stan_profile_data() { return tuple_temporary_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0] $ ../../../../../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 "-Wunknown-warning-option" +#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; @@ -15776,19 +14811,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; @@ -15872,15 +14899,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 { current_statement__ = 1; auto alpha = in__.template read>(N); @@ -16024,15 +15045,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 { current_statement__ = 1; auto alpha = in__.template read>(N); @@ -16177,25 +15192,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 { current_statement__ = 1; auto alpha = in__.template read>(N); @@ -16226,11 +15229,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__); @@ -16256,11 +15255,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", @@ -16443,4 +15438,7 @@ stan::math::profile_map& get_stan_profile_data() { return unpack_promote_model_namespace::profiles__; } #endif +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif [exit 0]