changeset 31904:123c5d78fc9d

quit.h: Do not declare functions in namespaces inside extern "C" block. * liboctave/util/quit.h: Name mangling of functions in namespaces inside extern "C" blocks might be undefined. At least, GCC and Clang seem to behave differently. Move function declarations that are in the "octave" namespace out of the extern "C" block.
author Markus Mützel <markus.muetzel@gmx.de>
date Mon, 13 Mar 2023 13:59:16 +0100
parents 4ab90bed411b
children 48eaf9df5a5b
files liboctave/util/quit.h
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/liboctave/util/quit.h	Sat Mar 11 17:22:33 2023 -0800
+++ b/liboctave/util/quit.h	Mon Mar 13 13:59:16 2023 +0100
@@ -36,7 +36,6 @@
 #  include <list>
 #  include <stdexcept>
 #  include <string>
-extern "C" {
 #else
 #  include <signal.h>
 #endif
@@ -200,6 +199,8 @@
 
 OCTAVE_END_NAMESPACE(octave)
 
+extern "C" {
+
 #endif
 
 // The following enum values are deprecated and will eventually be