optimization bug? in initialization of class variable
Nathan Sidwell
nathan@acm.org
Fri Dec 14 08:58:00 GMT 2001
"Andrew J. Malton" wrote:
>
> Is this a bug or a very wierd valid interpretation of the standard?
neither.
> where the T(e) denotes a temporary created with suitable conversion
> construction [8.5 14]. So this should invoke a conversion followed by a
> copy. Both constructors have to be accessible [12.2 1]. Creation of
> the temporary T(e) may be `avoided' [12.2 2 example] but semantic
> restrictions (acessibility) must still be satisfied.
read [12.8]/15 which says some of the cases where a temporary can be
elided 'even if the class constructor or destructor have sideeffects'
This is one such case.
nathan
--
Dr Nathan Sidwell :: Computer Science Department :: Bristol University
The voices in my head told me to say this
nathan@acm.org http://www.cs.bris.ac.uk/~nathan/ nathan@cs.bris.ac.uk
More information about the Gcc
mailing list