Created on 2010-08-31.00:00:00 last changed 130 months ago
[Voted into the WP at the March, 2011 meeting.]
Proposed resolution (November, 2010):
Change the comments in the example in 6.9.3.2 [basic.start.static] paragraph 3 as follows:
inline double fd() { return 1.0; } extern double d1; double d2 = d1; // unspecified: // may be statically initialized to 0.0 or // dynamically initializedto1.0to 0.0 if d1 is dynamically initialized, or 1.0 otherwise double d1 = fd(); // may be initialized statically or dynamically to 1.0
(The note should also be in running text following the bulleted list instead of appearing as a bulleted item, as well.)
The note in 6.9.3.2 [basic.start.static] paragraph 3 contains the following example:
inline double fd() { return 1.0; } extern double d1; double d2 = d1; // unspecified: // may be statically initialized to 0.0 or // dynamically initialized to 1.0 double d1 = fd(); // may be initialized statically to 1.0
The comment for d2 overlooks the third possibility: if both d1 and d2 are dynamically initialized, d2 will be initialized to 0.
History | |||
---|---|---|---|
Date | User | Action | Args |
2014-03-03 00:00:00 | admin | set | status: fdis -> c++11 |
2011-04-10 00:00:00 | admin | set | messages: + msg3297 |
2011-04-10 00:00:00 | admin | set | status: ready -> fdis |
2010-11-29 00:00:00 | admin | set | messages: + msg3047 |
2010-11-29 00:00:00 | admin | set | status: open -> ready |
2010-08-31 00:00:00 | admin | create |