Title
Are const volatile variables considered "constant expressions"?
Status
tc1
Section
10.1.7.1 [dcl.type.cv]
Submitter
Judy Ward

Created on 1998-12-15.00:00:00 last changed 208 months ago

Messages

Date: 1999-10-15.00:00:00

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

    A variable of non-volatile const-qualified ...
Date: 2003-04-25.00:00:00

The following code does not compile with the EDG compiler:

    volatile const int a = 5;
    int b[a];
The standard, 10.1.7.1 [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.
History
Date User Action Args
2003-04-25 00:00:00adminsetstatus: dr -> tc1
2000-02-23 00:00:00adminsetmessages: + msg297
2000-02-23 00:00:00adminsetstatus: ready -> dr
1998-12-15 00:00:00admincreate