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
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512
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
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.
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
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512
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
Anno domini 2020 Fri, 14 Feb 20:34:48 +0800 Michele Calgaro via trinity-devel scripsit:
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
To unsubscribe, e-mail: trinity-devel-unsubscribe@lists.pearsoncomputing.net For additional commands, e-mail: trinity-devel-help@lists.pearsoncomputing.net Read list messages on the web archive: http://trinity-devel.pearsoncomputing.net/ Please remember not to top-post: http://trinity.pearsoncomputing.net/mailing_lists/#top-posting
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
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512
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
Uhm... I removed "register" with whatever type I found. Perhaps I may have missed a few here and there?? I will have to double check then Cheers Michele
On 02/14/2020 06:51 AM, Slávek Banko wrote:
Probably such can be removed as well.
Yes, in the past 'register' was a hint to the compiler to keep that value stored in a register for faster access (a holdover from C). It was deprecated in C++11 and slated for removal in C++17. See:
open-std.org Doc. no. N4340 http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4340.html