Dne pá 14. února 2020 Michele Calgaro via trinity-devel napsal(a):
On 2020/02/14 04:00 PM, Dr. Nikolaus Klepp wrote:
Anno domini 2020 Fri, 14 Feb 01:53:46 -0600 David C. Rankin scripsit:
On 2020/01/26 05:24 PM, Dr. Nikolaus Klepp wrote:
Hi all!
Are the "register int" definitions in the TDE sources still needed? As far as I can tell the compiler just gives a warning and interprets "register int" as "int" - so would it bee a good idea to replace all "rgister int" with "int" ?
Nik
I think with the current state of compiler optimization, "register int" is pretty much useless or even make things worse . Cheers Michele
They are useless, register is no longer needed.
So can we remove them?
Nik
Already removed from code a couple of weeks ago or so. Cheers Michele
The register also appears to be in the code along with types other than 'int'. For example:
[2021/2181] Building CXX object ktalkd/ktalkd/CMakeFiles/ktalkd.dir/process.cpp.o In file included from ../ktalkd/ktalkd/process.cpp:64: ../ktalkd/ktalkd/table.h:66:23: warning: 'register' storage class specifier is deprecated and i ncompatible with C++17 [-Wdeprecated-register] void delete_entry(register TABLE_ENTRY *ptr);
==========
[319/1276] Building CXX object arts/modules/synth/CMakeFiles/artsmodulessynth-shared.dir/synth_ osc_impl.cc.o In file included from ../arts/modules/synth/synth_osc_impl.cc:27: In file included from /opt/trinity/include/arts/gsl/gslsignal.h:23: /opt/trinity/include/arts/gsl/gslieee754.h:231:11: warning: 'register' storage class specifier is deprecated and incompatible with C++17 [-Wdeprecated-register] gsl_ftoi (register float v) ^~~~~~~~~ /opt/trinity/include/arts/gsl/gslieee754.h:236:11: warning: 'register' storage class specifier is deprecated and incompatible with C++17 [-Wdeprecated-register] gsl_dtoi (register double v) ^~~~~~~~~ In file included from ../arts/modules/synth/synth_osc_impl.cc:27: /opt/trinity/include/arts/gsl/gslsignal.h:116:43: warning: 'register' storage class specifier i s deprecated and incompatible with C++17 [-Wdeprecated-register] static inline double gsl_approx_atan1 (register double x) G_GNUC_CONST; ^~~~~~~~~ ==================
[290/2742] Building CXX object libtdepim/CMakeFiles/tdepim-shared.dir/kxface.cpp.o In file included from ../libtdepim/kxface.cpp:26: ../libtdepim/kxface.h:568:19: warning: 'register' storage class specifier is deprecated and inc ompatible with C++17 [-Wdeprecated-register] int BigPop(register const Prob *p); ^~~~~~~~~ 1 warning generated.
Probably such can be removed as well.
Cheers