Mercurial > octave
changeset 21411:9f7282acc30f
Fix segfault caused by clang processing of GCC noreturn attribute.
* idx-vector.h (as_array): Remove OCTAVE_NORETURN attribute from prototype.
* idx-vector.cc: Add return statement to function to silence compiler warning.
author | Rik <rik@octave.org> |
---|---|
date | Mon, 07 Mar 2016 10:46:13 -0800 |
parents | 0c2ff0876a0f |
children | 9773a1c2b55f |
files | liboctave/array/idx-vector.cc liboctave/array/idx-vector.h |
diffstat | 2 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/liboctave/array/idx-vector.cc Sun Mar 06 13:44:06 2016 -0500 +++ b/liboctave/array/idx-vector.cc Mon Mar 07 10:46:13 2016 -0800 @@ -59,6 +59,9 @@ { (*current_liboctave_error_handler) ("internal error: as_array not allowed for this index class"); + + // Never actually executed, but required to silence compiler warning + return Array<octave_idx_type> (); }
--- a/liboctave/array/idx-vector.h Sun Mar 06 13:44:06 2016 -0500 +++ b/liboctave/array/idx-vector.h Mon Mar 07 10:46:13 2016 -0800 @@ -105,7 +105,7 @@ // i/o virtual std::ostream& print (std::ostream& os) const = 0; - OCTAVE_NORETURN virtual Array<octave_idx_type> as_array (void); + virtual Array<octave_idx_type> as_array (void); octave_refcount<int> count;