https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69681

Martin Sebor <msebor at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |msebor at gcc dot gnu.org

--- Comment #4 from Martin Sebor <msebor at gcc dot gnu.org> ---
C requires that the bound of an array with static or thread storage duration
with be an integer constant expression (this is in 6.7.6.2) whose
subexpressions exclude the address expression (among many others).  I suppose
the code could be accepted in C as an extension (as Clang does), though I'm not
sure I see the use case.

I haven't read the C++ parts very carefully but based on a quick check it does
look like it allows the array size to be a converted constant expression which
include functions, so it seems the code is valid in C++ (I'd say regardless of
whether the functions are defined).

Reply via email to