[cmake-developers] clang now warns: 'register' storage class specifier is deprecated

Rolf Eike Beer eike at sf-mail.de
Fri Jun 28 11:43:52 EDT 2013


Sean McBride wrote:
> Hi all,
> 
> Recently in clang trunk, they added a new warning which we now see on Rogue7
> since I updated my clang:
> 
> <http://open.cdash.org/viewBuildError.php?type=1&buildid=2949429>
> 
> CMake/Source/kwsys/RegularExpression.cxx:347:5: warning: 'register' storage
> class specifier is deprecated [-Wdeprecated-register] register const char*
> scan;
>     ^~~~~~~~~
> 
> I can make a patch to remove the 'register' keyword, if you will accept it. 
> Anyone have a philosophical objection?  If so, I will suppress the warning.

That code dates back until 1989/1991 according to the comments. At that time 
it may have been a good idea to hint the compiler which variables to put into 
registers, but I don't think that this would give much gain today. I remember 
having seen something like a year back where the register statement gave 
better code, but these thing should be very rare and compilers usually tend to 
improve.

So, IMHO: rip it off.

Eike
-- 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20130628/7e67575f/attachment.sig>


More information about the cmake-developers mailing list