Keyword register
From: Ioannis Vranos (ivr_at_remove.this.grad.com)
Date: 11/23/04
- Next message: Tom Widmer: "Re: MUCH simpler program displaying same behavior"
- Previous message: Gernot Frisch: "template trouble"
- Next in thread: Alf P. Steinbach: "Re: Keyword register"
- Reply: Alf P. Steinbach: "Re: Keyword register"
- Reply: Karl Heinz Buchegger: "Re: Keyword register"
- Reply: chris: "Re: Keyword register"
- Reply: Jerry Coffin: "Re: Keyword register"
- Reply: Jack Klein: "Re: Keyword register"
- Reply: Branimir Maksimovic: "Re: Keyword register"
- Reply: David Lindauer: "Re: Keyword register"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 23 Nov 2004 12:29:45 +0200
Just some thought on it, wanting to see any explanations.
It was advised in this newsgroups that we should avoid the use of
keyword register.
However it is a language feature, and if it offers no help to an
implementation, it is free to ignore it. And this happens widely, all my
C++ compilers in my platform ignore this keyword.
Also the use of register provides the additional guarantee that we do
not get the address of this variable which may indeed help an
implementation to optimise the variable access further, which was the
original purpose of its introduction after all.
So why we should not use register?
An implementation taking it into account means that the keyword helps it
indeed, otherwise the implementation *should* ignore it.
-- Ioannis Vranos http://www23.brinkster.com/noicys
- Next message: Tom Widmer: "Re: MUCH simpler program displaying same behavior"
- Previous message: Gernot Frisch: "template trouble"
- Next in thread: Alf P. Steinbach: "Re: Keyword register"
- Reply: Alf P. Steinbach: "Re: Keyword register"
- Reply: Karl Heinz Buchegger: "Re: Keyword register"
- Reply: chris: "Re: Keyword register"
- Reply: Jerry Coffin: "Re: Keyword register"
- Reply: Jack Klein: "Re: Keyword register"
- Reply: Branimir Maksimovic: "Re: Keyword register"
- Reply: David Lindauer: "Re: Keyword register"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|