This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 116a. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.

2024-12-19


76. Are const volatile variables considered "constant expressions"?

Section: 9.2.9.2  [dcl.type.cv]     Status: TC1     Submitter: Judy Ward     Date: 15 Dec 1998

The following code does not compile with the EDG compiler:

    volatile const int a = 5;
    int b[a];
The standard, 9.2.9.2 [dcl.type.cv] , says:
A variable of const-qualified integral or enumeration type initialized by an integral constant expression can be used in integral constant expressions.
This doesn't say it can't be const volatile-qualified, although I think that was what was intended.

Proposed Resolution (10/99): Change the referenced text in paragraph 2 of 9.2.9.2 [dcl.type.cv] to read: