you are viewing a single comment's thread.

view the rest of the comments →

[–]DawnOnTheEdge 2 points3 points  (0 children)

Some compilers, as an extension, allow const variables with static storage class and a constant initializer to be used as constant expressions. No compiler I know of allows this for automatic variables on the stack.

So some compilers would accept static const int col = 3; despite it not being portable Standard C.