changeset 21028:e3b3bb522d62

maint: Move GCC_ attributes to start of declaration for future compatibility. * error.cc, error.h, gripes.h, jit-typeinfo.cc, load-save.cc, oct-stream.cc, symtab.h, variables.h, ov-base.cc, ov-class.cc, ov-classdef.cc, ov-classdef.h, ov.cc, pt-mat.cc, dSparse.h, f77-fcn.h, lo-error.h, quit.h, lo-array-gripes.h: Move GCC_ attributes to start of declaration for future compatibility.
author Rik <rik@octave.org>
date Sun, 03 Jan 2016 10:58:15 -0800
parents 4a7d9c335402
children e204d44f5069
files libinterp/corefcn/error.cc libinterp/corefcn/error.h libinterp/corefcn/gripes.h libinterp/corefcn/jit-typeinfo.cc libinterp/corefcn/load-save.cc libinterp/corefcn/oct-stream.cc libinterp/corefcn/symtab.h libinterp/corefcn/variables.h libinterp/octave-value/ov-base.cc libinterp/octave-value/ov-class.cc libinterp/octave-value/ov-classdef.cc libinterp/octave-value/ov-classdef.h libinterp/octave-value/ov.cc libinterp/parse-tree/pt-mat.cc liboctave/array/dSparse.h liboctave/cruft/misc/f77-fcn.h liboctave/cruft/misc/lo-error.h liboctave/cruft/misc/quit.h liboctave/util/lo-array-gripes.h
diffstat 19 files changed, 180 insertions(+), 178 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/corefcn/error.cc
+++ b/libinterp/corefcn/error.cc
@@ -393,11 +393,8 @@
   va_end (args);
 }
 
-static void
-usage_1 (octave_execution_exception& e, const char *id,
-         const char *fmt, va_list args) GCC_ATTR_NORETURN;
-
-static void
+GCC_ATTR_NORETURN static
+void
 usage_1 (octave_execution_exception& e, const char *id,
          const char *fmt, va_list args)
 {
@@ -408,10 +405,8 @@
   throw e;
 }
 
-static void
-usage_1 (const char *id, const char *fmt, va_list args) GCC_ATTR_NORETURN;
-
-static void
+GCC_ATTR_NORETURN static
+void
 usage_1 (const char *id, const char *fmt, va_list args)
 {
   octave_execution_exception e = make_execution_exception ("usage");
@@ -449,15 +444,11 @@
   va_end (args);
 }
 
-static void
+GCC_ATTR_NORETURN static
+void
 error_1 (octave_execution_exception& e, std::ostream& os,
          const char *name, const char *id, const char *fmt,
-         va_list args, bool with_cfn = false) GCC_ATTR_NORETURN;
-
-static void
-error_1 (octave_execution_exception& e, std::ostream& os,
-         const char *name, const char *id, const char *fmt,
-         va_list args, bool with_cfn)
+         va_list args, bool with_cfn = false)
 {
   bool show_stack_trace = false;
 
@@ -501,14 +492,10 @@
   throw e;
 }
 
-static void
+GCC_ATTR_NORETURN static
+void
 error_1 (std::ostream& os, const char *name, const char *id,
-         const char *fmt, va_list args,
-         bool with_cfn = false) GCC_ATTR_NORETURN;
-
-static void
-error_1 (std::ostream& os, const char *name, const char *id,
-         const char *fmt, va_list args, bool with_cfn)
+         const char *fmt, va_list args, bool with_cfn = false)
 {
   octave_execution_exception e = make_execution_exception ("error");
 
--- a/libinterp/corefcn/error.h
+++ b/libinterp/corefcn/error.h
@@ -43,25 +43,35 @@
 
 extern OCTINTERP_API void message (const char *name, const char *fmt, ...);
 
-GCC_ATTR_DEPRECATED extern OCTINTERP_API void vusage (const char *fmt, va_list args) GCC_ATTR_NORETURN;
-GCC_ATTR_DEPRECATED extern OCTINTERP_API void usage (const char *fmt, ...) GCC_ATTR_NORETURN;
+GCC_ATTR_DEPRECATED GCC_ATTR_NORETURN OCTINTERP_API extern
+void vusage (const char *fmt, va_list args);
+
+GCC_ATTR_DEPRECATED GCC_ATTR_NORETURN OCTINTERP_API extern
+void usage (const char *fmt, ...);
 
 extern OCTINTERP_API void vwarning (const char *fmt, va_list args);
 extern OCTINTERP_API void warning (const char *fmt, ...);
 
-extern OCTINTERP_API void verror (const char *fmt, va_list args) GCC_ATTR_NORETURN;
-extern OCTINTERP_API void error (const char *fmt, ...) GCC_ATTR_NORETURN;
+GCC_ATTR_NORETURN OCTINTERP_API extern
+void verror (const char *fmt, va_list args);
+
+GCC_ATTR_NORETURN OCTINTERP_API extern
+void error (const char *fmt, ...);
 
-extern OCTINTERP_API void verror (octave_execution_exception&,
-                                  const char *fmt, va_list args) GCC_ATTR_NORETURN;
-extern OCTINTERP_API void error (octave_execution_exception&,
-                                 const char *fmt, ...) GCC_ATTR_NORETURN;
+GCC_ATTR_NORETURN OCTINTERP_API extern
+void verror (octave_execution_exception&, const char *fmt, va_list args);
+GCC_ATTR_NORETURN OCTINTERP_API extern
+void error (octave_execution_exception&, const char *fmt, ...);
 
-extern OCTINTERP_API void verror_with_cfn (const char *fmt, va_list args) GCC_ATTR_NORETURN;
-extern OCTINTERP_API void error_with_cfn (const char *fmt, ...) GCC_ATTR_NORETURN;
+GCC_ATTR_NORETURN OCTINTERP_API extern
+void verror_with_cfn (const char *fmt, va_list args);
+GCC_ATTR_NORETURN OCTINTERP_API extern
+void error_with_cfn (const char *fmt, ...);
 
-extern OCTINTERP_API void vparse_error (const char *fmt, va_list args) GCC_ATTR_NORETURN;
-extern OCTINTERP_API void parse_error (const char *fmt, ...) GCC_ATTR_NORETURN;
+GCC_ATTR_NORETURN OCTINTERP_API extern
+void vparse_error (const char *fmt, va_list args);
+GCC_ATTR_NORETURN OCTINTERP_API extern
+void parse_error (const char *fmt, ...);
 
 extern OCTINTERP_API void
 vmessage_with_id (const char *id, const char *name,
@@ -70,11 +80,11 @@
 extern OCTINTERP_API void
 message_with_id (const char *id, const char *name, const char *fmt, ...);
 
-extern OCTINTERP_API void
-vusage_with_id (const char *id, const char *fmt, va_list args) GCC_ATTR_NORETURN;
+GCC_ATTR_NORETURN OCTINTERP_API extern
+void vusage_with_id (const char *id, const char *fmt, va_list args);
 
-extern OCTINTERP_API void
-usage_with_id (const char *id, const char *fmt, ...) GCC_ATTR_NORETURN;
+GCC_ATTR_NORETURN OCTINTERP_API extern
+void usage_with_id (const char *id, const char *fmt, ...);
 
 extern OCTINTERP_API void
 vwarning_with_id (const char *id, const char *fmt, va_list args);
@@ -82,25 +92,26 @@
 extern OCTINTERP_API void
 warning_with_id (const char *id, const char *fmt, ...);
 
-extern OCTINTERP_API void
-verror_with_id (const char *id, const char *fmt, va_list args) GCC_ATTR_NORETURN;
+GCC_ATTR_NORETURN OCTINTERP_API extern
+void verror_with_id (const char *id, const char *fmt, va_list args);
 
-extern OCTINTERP_API void
-error_with_id (const char *id, const char *fmt, ...) GCC_ATTR_NORETURN;
+GCC_ATTR_NORETURN OCTINTERP_API extern
+void error_with_id (const char *id, const char *fmt, ...);
 
-extern OCTINTERP_API void
-verror_with_id_cfn (const char *id, const char *fmt, va_list args) GCC_ATTR_NORETURN;
+GCC_ATTR_NORETURN OCTINTERP_API extern
+void verror_with_id_cfn (const char *id, const char *fmt, va_list args);
 
-extern OCTINTERP_API void
-error_with_id_cfn (const char *id, const char *fmt, ...) GCC_ATTR_NORETURN;
+GCC_ATTR_NORETURN OCTINTERP_API extern
+void error_with_id_cfn (const char *id, const char *fmt, ...);
+
+GCC_ATTR_NORETURN OCTINTERP_API extern
+void vparse_error_with_id (const char *id, const char *fmt, va_list args);
 
-extern OCTINTERP_API void
-vparse_error_with_id (const char *id, const char *fmt, va_list args) GCC_ATTR_NORETURN;
+GCC_ATTR_NORETURN OCTINTERP_API extern
+void parse_error_with_id (const char *id, const char *fmt, ...);
 
-extern OCTINTERP_API void
-parse_error_with_id (const char *id, const char *fmt, ...) GCC_ATTR_NORETURN;
-
-extern OCTINTERP_API void panic (const char *fmt, ...) GCC_ATTR_NORETURN;
+GCC_ATTR_NORETURN OCTINTERP_API extern
+void panic (const char *fmt, ...);
 
 // Helper function for print_usage defined in defun.cc.
 extern OCTINTERP_API void defun_usage_message (const std::string& msg);
--- a/libinterp/corefcn/gripes.h
+++ b/libinterp/corefcn/gripes.h
@@ -34,18 +34,19 @@
 // Alphabetized list of gripes.
 ////////////////////////////////////////////////////////////////////////////////
 
-extern OCTINTERP_API void GCC_ATTR_NORETURN
-gripe_2_or_3_dim_plot (void);
+GCC_ATTR_NORETURN OCTINTERP_API extern
+void gripe_2_or_3_dim_plot (void);
 
-extern OCTINTERP_API void GCC_ATTR_NORETURN
-gripe_data_conversion (const char *from, const char *to);
+GCC_ATTR_NORETURN OCTINTERP_API extern
+void gripe_data_conversion (const char *from, const char *to);
 
 extern OCTINTERP_API void
 gripe_data_file_in_path (const std::string& fcn, const std::string& file);
 
-extern OCTINTERP_API void GCC_ATTR_NORETURN
-gripe_disabled_feature (const std::string& func, const std::string& feature,
-                        const std::string& pkg="Octave");
+GCC_ATTR_NORETURN OCTINTERP_API extern
+void gripe_disabled_feature (const std::string& func,
+                             const std::string& feature,
+                             const std::string& pkg="Octave");
 
 extern OCTINTERP_API void
 gripe_divide_by_zero (void);
@@ -60,14 +61,14 @@
 gripe_implicit_conversion (const std::string& id, const std::string& from,
                            const std::string& to);
 
-extern OCTINTERP_API void GCC_ATTR_NORETURN
-gripe_indexed_cs_list (void);
+GCC_ATTR_NORETURN OCTINTERP_API extern
+void gripe_indexed_cs_list (void);
 
-extern OCTINTERP_API void GCC_ATTR_NORETURN
-gripe_invalid_conversion (const std::string& from, const std::string& to);
+GCC_ATTR_NORETURN OCTINTERP_API extern
+void gripe_invalid_conversion (const std::string& from, const std::string& to);
 
-extern OCTINTERP_API void GCC_ATTR_NORETURN
-gripe_invalid_inquiry_subscript (void);
+GCC_ATTR_NORETURN OCTINTERP_API extern
+void gripe_invalid_inquiry_subscript (void);
 
 extern OCTINTERP_API void
 gripe_invalid_value_specified (const char *name);
@@ -75,45 +76,45 @@
 extern OCTINTERP_API void
 gripe_logical_conversion (void);
 
-extern OCTINTERP_API void GCC_ATTR_NORETURN
-gripe_nonbraced_cs_list_assignment (void);
+GCC_ATTR_NORETURN OCTINTERP_API extern
+void gripe_nonbraced_cs_list_assignment (void);
 
-extern OCTINTERP_API void GCC_ATTR_NORETURN
-gripe_nonconformant (void);
+GCC_ATTR_NORETURN OCTINTERP_API extern
+void gripe_nonconformant (void);
 
-extern OCTINTERP_API void GCC_ATTR_NORETURN
-gripe_nonconformant (octave_idx_type r1, octave_idx_type c1,
-                     octave_idx_type r2, octave_idx_type c2);
+GCC_ATTR_NORETURN OCTINTERP_API extern
+void gripe_nonconformant (octave_idx_type r1, octave_idx_type c1,
+                          octave_idx_type r2, octave_idx_type c2);
 
-extern OCTINTERP_API void GCC_ATTR_NORETURN
-gripe_not_implemented (const char *);
+GCC_ATTR_NORETURN OCTINTERP_API extern
+void gripe_not_implemented (const char *);
 
-extern OCTINTERP_API void GCC_ATTR_NORETURN
-gripe_not_supported (const char *);
+GCC_ATTR_NORETURN OCTINTERP_API extern
+void gripe_not_supported (const char *);
 
-extern OCTINTERP_API void GCC_ATTR_NORETURN
-gripe_range_invalid (void);
+GCC_ATTR_NORETURN OCTINTERP_API extern
+void gripe_range_invalid (void);
 
-extern OCTINTERP_API void GCC_ATTR_NORETURN
-gripe_square_matrix_required (const char *name);
+GCC_ATTR_NORETURN OCTINTERP_API extern
+void gripe_square_matrix_required (const char *name);
 
-extern OCTINTERP_API void GCC_ATTR_NORETURN
-gripe_string_invalid (void);
+GCC_ATTR_NORETURN OCTINTERP_API extern
+void gripe_string_invalid (void);
 
-extern OCTINTERP_API void GCC_ATTR_NORETURN
-gripe_unrecognized_data_fmt (const char *warn_for);
+GCC_ATTR_NORETURN OCTINTERP_API extern
+void gripe_unrecognized_data_fmt (const char *warn_for);
 
-extern OCTINTERP_API void GCC_ATTR_NORETURN
-gripe_unrecognized_float_fmt (void);
+GCC_ATTR_NORETURN OCTINTERP_API extern
+void gripe_unrecognized_float_fmt (void);
 
-extern OCTINTERP_API void GCC_ATTR_NORETURN
-gripe_user_returned_invalid (const char *name);
+GCC_ATTR_NORETURN OCTINTERP_API extern
+void gripe_user_returned_invalid (const char *name);
 
-extern OCTINTERP_API void GCC_ATTR_NORETURN
-gripe_user_supplied_eval (const char *name);
+GCC_ATTR_NORETURN OCTINTERP_API extern
+void gripe_user_supplied_eval (const char *name);
 
-extern OCTINTERP_API void GCC_ATTR_NORETURN
-gripe_user_supplied_eval (octave_execution_exception& e, const char *name);
+GCC_ATTR_NORETURN OCTINTERP_API extern
+void gripe_user_supplied_eval (octave_execution_exception& e, const char *name);
 
 extern OCTINTERP_API void
 gripe_warn_complex_cmp (void);
@@ -181,10 +182,10 @@
                       const octave_value& tc,
                       bool is_error = true);
 
-extern OCTINTERP_API void GCC_ATTR_NORETURN
-gripe_wrong_type_arg_for_binary_op (const octave_value& op);
+GCC_ATTR_NORETURN OCTINTERP_API extern
+void gripe_wrong_type_arg_for_binary_op (const octave_value& op);
 
-extern OCTINTERP_API void GCC_ATTR_NORETURN
-gripe_wrong_type_arg_for_unary_op (const octave_value& op);
+GCC_ATTR_NORETURN OCTINTERP_API extern
+void gripe_wrong_type_arg_for_unary_op (const octave_value& op);
 
 #endif
--- a/libinterp/corefcn/jit-typeinfo.cc
+++ b/libinterp/corefcn/jit-typeinfo.cc
@@ -439,7 +439,8 @@
   std::cout << *m << std::endl;
 }
 
-static void GCC_ATTR_NORETURN
+GCC_ATTR_NORETURN static
+void
 gripe_bad_result (void)
 {
   error ("incorrect type information given to the JIT compiler");
--- a/libinterp/corefcn/load-save.cc
+++ b/libinterp/corefcn/load-save.cc
@@ -126,7 +126,8 @@
 // no newline characters.
 static std::string Vsave_header_format_string = default_save_header_format ();
 
-static void GCC_ATTR_NORETURN
+GCC_ATTR_NORETURN static
+void
 gripe_file_open (const std::string& fcn, const std::string& file)
 {
   if (fcn == "load")
--- a/libinterp/corefcn/oct-stream.cc
+++ b/libinterp/corefcn/oct-stream.cc
@@ -4155,10 +4155,8 @@
   return stream_number;
 }
 
-static void
-gripe_invalid_file_id (int fid, const std::string& who) GCC_ATTR_NORETURN;
-
-static void
+GCC_ATTR_NORETURN static
+void
 gripe_invalid_file_id (int fid, const std::string& who)
 {
   if (who.empty ())
--- a/libinterp/corefcn/symtab.h
+++ b/libinterp/corefcn/symtab.h
@@ -1340,10 +1340,10 @@
   }
 
   // Use assign (name, value, scope, context, force_add) instead.
-  GCC_ATTR_DEPRECATED static octave_value&
+  GCC_ATTR_DEPRECATED static
+  octave_value&
   varref (const std::string& name, scope_id scope = xcurrent_scope,
           context_id context = xdefault_context, bool force_add = false)
-          
   {
     static octave_value foobar;
 
@@ -1364,7 +1364,8 @@
   }
 
   // Use force_assign (name, value, scope, context) instead.
-  GCC_ATTR_DEPRECATED static octave_value&
+  GCC_ATTR_DEPRECATED static
+  octave_value&
   force_varref (const std::string& name, scope_id scope = xcurrent_scope,
                 context_id context = xdefault_context)
   {
@@ -1398,7 +1399,8 @@
   }
 
   // Use global_assign (name, value) instead.
-  GCC_ATTR_DEPRECATED static octave_value&
+  GCC_ATTR_DEPRECATED static
+  octave_value&
   global_varref (const std::string& name)
 
   {
@@ -1423,7 +1425,8 @@
   }
 
   // Use top_level_assign (name, value) instead.
-  GCC_ATTR_DEPRECATED static octave_value&
+  GCC_ATTR_DEPRECATED static
+  octave_value&
   top_level_varref (const std::string& name)
   {
     static octave_value foobar;
@@ -1450,7 +1453,8 @@
   }
 
   // Use persistent_assign (name, value) instead.
-  GCC_ATTR_DEPRECATED static octave_value&
+  GCC_ATTR_DEPRECATED static
+  octave_value&
   persistent_varref (const std::string& name)
   {
     static octave_value foobar;
--- a/libinterp/corefcn/variables.h
+++ b/libinterp/corefcn/variables.h
@@ -137,9 +137,8 @@
 
 extern OCTINTERP_API void bind_ans (const octave_value& val, bool print);
 
-GCC_ATTR_DEPRECATED extern OCTINTERP_API void
-bind_internal_variable (const std::string& fname,
-                        const octave_value& val);
+GCC_ATTR_DEPRECATED OCTINTERP_API extern
+void bind_internal_variable (const std::string& fname, const octave_value& val);
 
 extern OCTINTERP_API void mlock (void);
 extern OCTINTERP_API void munlock (const std::string&);
--- a/libinterp/octave-value/ov-base.cc
+++ b/libinterp/octave-value/ov-base.cc
@@ -1297,21 +1297,24 @@
      << " dims: " << dv.str ();
 }
 
-static void GCC_ATTR_NORETURN
+GCC_ATTR_NORETURN static
+void
 gripe_indexed_assignment (const std::string& tn1, const std::string& tn2)
 {
   error ("assignment of '%s' to indexed '%s' not implemented",
          tn2.c_str (), tn1.c_str ());
 }
 
-static void GCC_ATTR_NORETURN
+GCC_ATTR_NORETURN static
+void
 gripe_assign_conversion_failed (const std::string& tn1, const std::string& tn2)
 {
   error ("type conversion for assignment of '%s' to indexed '%s' failed",
          tn2.c_str (), tn1.c_str ());
 }
 
-static void GCC_ATTR_NORETURN
+GCC_ATTR_NORETURN static
+void
 gripe_no_conversion (const std::string& on, const std::string& tn1,
                      const std::string& tn2)
 {
--- a/libinterp/octave-value/ov-class.cc
+++ b/libinterp/octave-value/ov-class.cc
@@ -238,19 +238,22 @@
   return retval;
 }
 
-static void GCC_ATTR_NORETURN
+GCC_ATTR_NORETURN static
+void
 gripe_invalid_index1 (void)
 {
   error ("invalid index for class");
 }
 
-static void GCC_ATTR_NORETURN
+GCC_ATTR_NORETURN static
+void
 gripe_invalid_index_for_assignment (void)
 {
   error ("invalid index for class assignment");
 }
 
-static void GCC_ATTR_NORETURN 
+GCC_ATTR_NORETURN static
+void
 gripe_invalid_index_type (const std::string& nm, char t)
 {
   error ("%s cannot be indexed with %c", nm.c_str (), t);
--- a/libinterp/octave-value/ov-classdef.cc
+++ b/libinterp/octave-value/ov-classdef.cc
@@ -47,11 +47,9 @@
 
 // Define to 1 to enable debugging statements.
 #define DEBUG_TRACE 0
-static void
-gripe_method_access (const std::string& from,
-                     const cdef_method& meth) GCC_ATTR_NORETURN;
-
-static void
+
+GCC_ATTR_NORETURN static
+void
 gripe_method_access (const std::string& from, const cdef_method& meth)
 {
   octave_value acc = meth.get ("Access");
@@ -66,11 +64,8 @@
          from.c_str (), meth.get_name ().c_str (), acc_s.c_str ());
 }
 
-static void
-gripe_property_access (const std::string& from, const cdef_property& prop,
-                       bool is_set) GCC_ATTR_NORETURN;
-
-static void
+GCC_ATTR_NORETURN static
+void
 gripe_property_access (const std::string& from, const cdef_property& prop,
                        bool is_set = false)
 {
--- a/libinterp/octave-value/ov-classdef.h
+++ b/libinterp/octave-value/ov-classdef.h
@@ -175,7 +175,7 @@
   // No assignment
   cdef_object_rep& operator = (const cdef_object_rep& );
 
-  void GCC_ATTR_NORETURN gripe_invalid_object (const char *who) const
+  GCC_ATTR_NORETURN void gripe_invalid_object (const char *who) const
   { error ("%s: invalid object", who); }
 };
 
--- a/libinterp/octave-value/ov.cc
+++ b/libinterp/octave-value/ov.cc
@@ -2315,14 +2315,16 @@
   return retval;
 }
 
-static void GCC_ATTR_NORETURN
+GCC_ATTR_NORETURN static
+void
 gripe_cat_op (const std::string& tn1, const std::string& tn2)
 {
   error ("concatenation operator not implemented for '%s' by '%s' operations",
          tn1.c_str (), tn2.c_str ());
 }
 
-static void GCC_ATTR_NORETURN
+GCC_ATTR_NORETURN static
+void
 gripe_cat_op_conv (void)
 {
   error ("type conversion failed for concatenation operator");
--- a/libinterp/parse-tree/pt-mat.cc
+++ b/libinterp/parse-tree/pt-mat.cc
@@ -273,11 +273,8 @@
   return retval;
 }
 
-static void
-eval_error (const char *msg, const dim_vector& x,
-            const dim_vector& y) GCC_ATTR_NORETURN;
-
-static void
+GCC_ATTR_NORETURN static
+void
 eval_error (const char *msg, const dim_vector& x, const dim_vector& y)
 {
   error ("%s (%s vs %s)", msg, x.str ().c_str (), y.str ().c_str ());
--- a/liboctave/array/dSparse.h
+++ b/liboctave/array/dSparse.h
@@ -121,14 +121,14 @@
   friend OCTAVE_API SparseMatrix real (const SparseComplexMatrix& a);
   friend OCTAVE_API SparseMatrix imag (const SparseComplexMatrix& a);
 
-  friend GCC_ATTR_DEPRECATED OCTAVE_API
-    SparseMatrix atan2 (const double& x, const SparseMatrix& y);
+  GCC_ATTR_DEPRECATED OCTAVE_API friend 
+  SparseMatrix atan2 (const double& x, const SparseMatrix& y);
 
-  friend GCC_ATTR_DEPRECATED OCTAVE_API
-    SparseMatrix atan2 (const SparseMatrix& x, const double& y);
+  GCC_ATTR_DEPRECATED OCTAVE_API friend 
+  SparseMatrix atan2 (const SparseMatrix& x, const double& y);
 
-  friend GCC_ATTR_DEPRECATED OCTAVE_API
-    SparseMatrix atan2 (const SparseMatrix& x, const SparseMatrix& y);
+  GCC_ATTR_DEPRECATED OCTAVE_API friend 
+  SparseMatrix atan2 (const SparseMatrix& x, const SparseMatrix& y);
 
   SparseMatrix transpose (void) const
   {
--- a/liboctave/cruft/misc/f77-fcn.h
+++ b/liboctave/cruft/misc/f77-fcn.h
@@ -283,9 +283,10 @@
  cs[F77_CHAR_ARG_LEN_USE(s, len)] = '\0'
 
 
-extern CRUFT_API F77_RET_T
+GCC_ATTR_NORETURN CRUFT_API extern
+F77_RET_T 
 F77_FUNC (xstopx, XSTOPX) (F77_CONST_CHAR_ARG_DECL
-                           F77_CHAR_ARG_LEN_DECL) GCC_ATTR_NORETURN;
+                           F77_CHAR_ARG_LEN_DECL);
 
 #ifdef __cplusplus
 }
--- a/liboctave/cruft/misc/lo-error.h
+++ b/liboctave/cruft/misc/lo-error.h
@@ -27,17 +27,18 @@
 extern "C" {
 #endif
 
-extern void liboctave_fatal (const char *fmt, ...) GCC_ATTR_NORETURN;
+GCC_ATTR_NORETURN extern void liboctave_fatal (const char *fmt, ...);
 
-extern void liboctave_fatal_with_id (const char *id, const char *fmt, ...) GCC_ATTR_NORETURN;
+GCC_ATTR_NORETURN extern
+void liboctave_fatal_with_id (const char *id, const char *fmt, ...);
 
 extern void liboctave_warning (const char *fmt, ...);
 
 extern void liboctave_warning_with_id (const char *id, const char *fmt, ...);
 
-typedef void (*liboctave_error_handler) (const char *, ...) GCC_ATTR_NORETURN;
+typedef GCC_ATTR_NORETURN void (*liboctave_error_handler) (const char *, ...);
 
-typedef void (*liboctave_error_with_id_handler) (const char *, const char *, ...) GCC_ATTR_NORETURN;
+typedef GCC_ATTR_NORETURN void (*liboctave_error_with_id_handler) (const char *, const char *, ...);
 
 typedef void (*liboctave_warning_handler) (const char *, ...);
 
--- a/liboctave/cruft/misc/quit.h
+++ b/liboctave/cruft/misc/quit.h
@@ -66,7 +66,7 @@
 
 CRUFT_API extern void octave_restore_current_context (void *);
 
-CRUFT_API extern void octave_jump_to_enclosing_context (void) GCC_ATTR_NORETURN;
+GCC_ATTR_NORETURN CRUFT_API extern void octave_jump_to_enclosing_context (void);
 
 CRUFT_API extern void octave_save_signal_mask (void);
 
@@ -141,11 +141,11 @@
 
 CRUFT_API extern void octave_handle_signal (void);
 
-CRUFT_API extern void octave_throw_interrupt_exception (void) GCC_ATTR_NORETURN;
+GCC_ATTR_NORETURN CRUFT_API extern void octave_throw_interrupt_exception (void);
 
-CRUFT_API extern void octave_throw_execution_exception (void) GCC_ATTR_NORETURN;
+GCC_ATTR_NORETURN CRUFT_API extern void octave_throw_execution_exception (void);
 
-CRUFT_API extern void octave_throw_bad_alloc (void) GCC_ATTR_NORETURN;
+GCC_ATTR_NORETURN CRUFT_API extern void octave_throw_bad_alloc (void);
 
 CRUFT_API extern void octave_rethrow_exception (void);
 
--- a/liboctave/util/lo-array-gripes.h
+++ b/liboctave/util/lo-array-gripes.h
@@ -109,59 +109,57 @@
 
 extern OCTAVE_API const char *warning_id_singular_matrix;
 
-extern void OCTAVE_API
-gripe_nan_to_logical_conversion (void) GCC_ATTR_NORETURN;
+GCC_ATTR_NORETURN OCTAVE_API extern void 
+gripe_nan_to_logical_conversion (void);
 
-extern void OCTAVE_API
-gripe_nan_to_character_conversion (void) GCC_ATTR_NORETURN;
+GCC_ATTR_NORETURN OCTAVE_API extern void 
+gripe_nan_to_character_conversion (void);
 
-extern void OCTAVE_API
+GCC_ATTR_NORETURN OCTAVE_API extern void 
 gripe_nonconformant (const char *op,
                      octave_idx_type op1_len,
-                     octave_idx_type op2_len) GCC_ATTR_NORETURN;
+                     octave_idx_type op2_len);
 
-extern void OCTAVE_API
+GCC_ATTR_NORETURN OCTAVE_API extern void 
 gripe_nonconformant (const char *op,
                      octave_idx_type op1_nr, octave_idx_type op1_nc,
-                     octave_idx_type op2_nr, octave_idx_type op2_nc)
-                    GCC_ATTR_NORETURN;
+                     octave_idx_type op2_nr, octave_idx_type op2_nc);
 
 
-extern void OCTAVE_API
+GCC_ATTR_NORETURN OCTAVE_API extern void 
 gripe_nonconformant (const char *op, const dim_vector& op1_dims,
-                     const dim_vector& op2_dims) GCC_ATTR_NORETURN;
+                     const dim_vector& op2_dims);
 
-extern void OCTAVE_API
+GCC_ATTR_NORETURN OCTAVE_API extern void 
 gripe_index_out_of_range (int nd, int dim,
                           octave_idx_type iext, octave_idx_type ext,
-                          const dim_vector& d) GCC_ATTR_NORETURN;
+                          const dim_vector& d);
 
-extern void OCTAVE_API
+GCC_ATTR_NORETURN OCTAVE_API extern void 
 gripe_index_out_of_range (int nd, int dim,
-                          octave_idx_type iext, octave_idx_type ext)
-                         GCC_ATTR_NORETURN;
+                          octave_idx_type iext, octave_idx_type ext);
 
-extern void OCTAVE_API
+GCC_ATTR_NORETURN OCTAVE_API extern void 
 gripe_del_index_out_of_range (bool is1d, octave_idx_type iext,
-                              octave_idx_type ext) GCC_ATTR_NORETURN;
+                              octave_idx_type ext);
 
-extern void OCTAVE_API
+GCC_ATTR_NORETURN OCTAVE_API extern void 
 gripe_invalid_index (double, octave_idx_type nd = 0,
                      octave_idx_type dim = 0,
-                     const std::string& var = "") GCC_ATTR_NORETURN;
+                     const std::string& var = "");
 
-extern void OCTAVE_API
+GCC_ATTR_NORETURN OCTAVE_API extern void 
 gripe_invalid_index (octave_idx_type n, octave_idx_type nd = 0,
                      octave_idx_type dim = 0,
-                     const std::string& var = "") GCC_ATTR_NORETURN;
+                     const std::string& var = "");
 
-extern void OCTAVE_API
+GCC_ATTR_NORETURN OCTAVE_API extern void 
 gripe_invalid_index (const std::string& idx, octave_idx_type nd = 0,
                      octave_idx_type dim = 0,
-                     const std::string& var = "") GCC_ATTR_NORETURN;
+                     const std::string& var = "");
 
-extern void OCTAVE_API
-gripe_invalid_resize (void) GCC_ATTR_NORETURN;
+GCC_ATTR_NORETURN OCTAVE_API extern void
+gripe_invalid_resize (void);
 
 extern void OCTAVE_API
 gripe_singular_matrix (double rcond = 0.0);