Mercurial > jwe > octave
comparison liboctave/util/lo-array-gripes.cc @ 21135:95da3bc8a281
supress deprecated function warnings in Octave code
* lo-array-gripes.cc, gripes.cc: Use GCC pragmas to suppress
deprecated function warnings.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Fri, 22 Jan 2016 13:45:21 -0500 |
parents | 7bb96a8df912 |
children | e06e600f396a |
comparison
equal
deleted
inserted
replaced
21134:2e5c1f766ac9 | 21135:95da3bc8a281 |
---|---|
145 gripe_invalid_index (octave_idx_type n, octave_idx_type nd, | 145 gripe_invalid_index (octave_idx_type n, octave_idx_type nd, |
146 octave_idx_type dim, const std::string& var) | 146 octave_idx_type dim, const std::string& var) |
147 { | 147 { |
148 std::ostringstream buf; | 148 std::ostringstream buf; |
149 buf << n + 1; | 149 buf << n + 1; |
150 | |
151 #if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC) | |
152 #pragma GCC diagnostic push | |
153 #pragma GCC diagnostic ignored "-Wdeprecated-declarations" | |
154 #endif | |
155 | |
150 gripe_invalid_index (buf.str (), nd, dim, var); | 156 gripe_invalid_index (buf.str (), nd, dim, var); |
157 | |
158 #if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC) | |
159 #pragma GCC diagnostic pop | |
160 #endif | |
151 } | 161 } |
152 | 162 |
153 void | 163 void |
154 gripe_invalid_index (double n, octave_idx_type nd, octave_idx_type dim, | 164 gripe_invalid_index (double n, octave_idx_type nd, octave_idx_type dim, |
155 const std::string& var) | 165 const std::string& var) |
156 { | 166 { |
157 std::ostringstream buf; | 167 std::ostringstream buf; |
158 buf << n + 1; | 168 buf << n + 1; |
169 | |
170 #if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC) | |
171 #pragma GCC diagnostic push | |
172 #pragma GCC diagnostic ignored "-Wdeprecated-declarations" | |
173 #endif | |
174 | |
159 gripe_invalid_index (buf.str (), nd, dim, var); | 175 gripe_invalid_index (buf.str (), nd, dim, var); |
176 | |
177 #if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC) | |
178 #pragma GCC diagnostic pop | |
179 #endif | |
160 } | 180 } |
161 | 181 |
162 | 182 |
163 // Gripe and exception for read access beyond the bounds of an array. | 183 // Gripe and exception for read access beyond the bounds of an array. |
164 | 184 |