Skip to content

Commit 485922c

Browse files
dirk-zimochralphlange
authored andcommitted
fix gcc-15 problem
gcc-15 mangles variables inside namespaces even if they are declared extern "C". That causes linker errors. This is probably a bug in gcc-15. Observed with gcc version 15.1.1.
1 parent 4932fed commit 485922c

2 files changed

Lines changed: 4 additions & 5 deletions

File tree

devOpcuaSup/iocshIntegration.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1106,8 +1106,6 @@ void opcuaIocshRegister ()
11061106
iocshRegister(&opcuaShowDataFuncDef, opcuaShowDataCallFunc);
11071107
}
11081108

1109-
extern "C" {
1110-
epicsExportRegistrar(opcuaIocshRegister);
1111-
}
1112-
11131109
} // namespace
1110+
1111+
extern "C" { epicsExportRegistrar(opcuaIocshRegister); }

devOpcuaSup/opcuaItemRecord.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,7 @@ rset opcuaItemRSET = {
203203
get_control_double,
204204
get_alarm_double
205205
};
206-
extern "C" { epicsExportAddress(rset, opcuaItemRSET); }
207206

208207
} // namespace
208+
209+
extern "C" { epicsExportAddress(rset, opcuaItemRSET); }

0 commit comments

Comments
 (0)