# HG changeset patch # User John W. Eaton # Date 1453488321 18000 # Node ID 95da3bc8a281962c480640391cbc8581066f7cd9 # Parent 2e5c1f766ac95112ee6ea641447e3c3fce6cbcfe supress deprecated function warnings in Octave code * lo-array-gripes.cc, gripes.cc: Use GCC pragmas to suppress deprecated function warnings. diff -r 2e5c1f766ac9 -r 95da3bc8a281 libinterp/corefcn/gripes.cc --- a/libinterp/corefcn/gripes.cc Fri Jan 22 12:15:12 2016 -0500 +++ b/libinterp/corefcn/gripes.cc Fri Jan 22 13:45:21 2016 -0500 @@ -199,7 +199,16 @@ { octave_execution_exception e; +#if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#endif + gripe_user_supplied_eval (e, name); + +#if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC) +#pragma GCC diagnostic pop +#endif } void @@ -221,7 +230,16 @@ { octave_execution_exception e; +#if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#endif + gripe_wrong_type_arg (e, name, s, is_error); + +#if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC) +#pragma GCC diagnostic pop +#endif } void @@ -239,14 +257,32 @@ { octave_execution_exception e; +#if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#endif + gripe_wrong_type_arg (e, name, s.c_str (), is_error); + +#if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC) +#pragma GCC diagnostic pop +#endif } void gripe_wrong_type_arg (octave_execution_exception& e, const char *name, const std::string& s, bool is_error) { +#if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#endif + gripe_wrong_type_arg (e, name, s.c_str (), is_error); + +#if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC) +#pragma GCC diagnostic pop +#endif } void @@ -255,7 +291,16 @@ { octave_execution_exception e; +#if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#endif + gripe_wrong_type_arg (e, name, tc, is_error); + +#if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC) +#pragma GCC diagnostic pop +#endif } void @@ -265,7 +310,16 @@ { std::string type = tc.type_name (); +#if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#endif + gripe_wrong_type_arg (e, name, type, is_error); + +#if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC) +#pragma GCC diagnostic pop +#endif } void @@ -274,7 +328,16 @@ { octave_execution_exception e; +#if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#endif + gripe_wrong_type_arg (e, name, tc, is_error); + +#if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC) +#pragma GCC diagnostic pop +#endif } void @@ -282,7 +345,16 @@ const std::string& name, const octave_value& tc, bool is_error) { +#if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#endif + gripe_wrong_type_arg (e, name.c_str (), tc, is_error); + +#if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC) +#pragma GCC diagnostic pop +#endif } void @@ -290,7 +362,16 @@ { octave_execution_exception e; +#if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#endif + gripe_wrong_type_arg (e, s, is_error); + +#if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC) +#pragma GCC diagnostic pop +#endif } void @@ -308,14 +389,32 @@ { octave_execution_exception e; +#if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#endif + gripe_wrong_type_arg (e, s, is_error); + +#if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC) +#pragma GCC diagnostic pop +#endif } void gripe_wrong_type_arg (octave_execution_exception& e, const std::string& s, bool is_error) { +#if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#endif + gripe_wrong_type_arg (e, s.c_str (), is_error); + +#if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC) +#pragma GCC diagnostic pop +#endif } void @@ -323,7 +422,16 @@ { octave_execution_exception e; +#if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#endif + gripe_wrong_type_arg (e, tc, is_error); + +#if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC) +#pragma GCC diagnostic pop +#endif } void @@ -332,7 +440,16 @@ { std::string type = tc.type_name (); +#if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#endif + gripe_wrong_type_arg (e, type, is_error); + +#if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC) +#pragma GCC diagnostic pop +#endif } void diff -r 2e5c1f766ac9 -r 95da3bc8a281 liboctave/util/lo-array-gripes.cc --- a/liboctave/util/lo-array-gripes.cc Fri Jan 22 12:15:12 2016 -0500 +++ b/liboctave/util/lo-array-gripes.cc Fri Jan 22 13:45:21 2016 -0500 @@ -147,7 +147,17 @@ { std::ostringstream buf; buf << n + 1; + +#if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#endif + gripe_invalid_index (buf.str (), nd, dim, var); + +#if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC) +#pragma GCC diagnostic pop +#endif } void @@ -156,7 +166,17 @@ { std::ostringstream buf; buf << n + 1; + +#if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#endif + gripe_invalid_index (buf.str (), nd, dim, var); + +#if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC) +#pragma GCC diagnostic pop +#endif }