[Development] Removing the use of 'register'

Thiago Macieira thiago.macieira at intel.com
Sat Jun 15 01:34:51 CEST 2013


On sexta-feira, 14 de junho de 2013 16.25.28, Thiago Macieira wrote:
> On sábado, 15 de junho de 2013 00.59.18, Giuseppe D'Angelo wrote:
> > On 15 June 2013 00:37, Thiago Macieira <thiago.macieira at intel.com> wrote:
> > > C++11 did not change the meaning of the keyword. This is a completely
> > > made-up warning by Clang, like the GCC warning that says const in
> > > prvalue
> > > return types makes no sense or the one telling you to use () around &&
> > > with ||.
> > 
> > No, "register" is officially deprecated (N3337 §D.2 [depr.register]),
> > so the warning "makes sense". My concern was about getting such
> > warnings from code we don't have control upon, that is, 3rdparty code
> > (qtbase/3rdparty, webkit, v8...)
> 
> N3337 isn't in C++11 (which was N3291). It can only be C++14.

Actually, naming N3337 threw me off. That's the editor's update to N3291, so 
it's got the same content modulo editorial updates.

depr.register wasn't added by any paper. It actually came via member body 
submissions (UK 86):
	http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#809

Please note that #definer register <empty> is not acceptable. The keyword is 
still used in extension code with assembly. In fact, for some IA-64 it is 
sometimes required if you need to select specific registers.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.qt-project.org/pipermail/development/attachments/20130614/cbdd1580/attachment.sig>


More information about the Development mailing list