ISO C 90 standard

R

Randy Howard

Harald van Dijk wrote
(in article
Randy Howard wrote:

Could you give an example where current gcc versions miscompile or
refuse to compile a program with a valid use of VLA's?

Do you need an example when they explicitly say:

"The C99 semantics of variable length arrays (VLAs) are not
fully implemented by the existing GCC extension: the concept of
variably modified (VM) types, and the rules for what identifiers
can be declared with VLA or VM types, are not implemented (for
example, GCC allows elements of VM type in a structure with
block scope); while the syntax for arrays to be declared with
[*] in parameter declarations is present, the semantics are not;
and in general the implementation of VLAs has not been checked
against C99 requirements."

?
I'm aware that
the gcc folks themselves say their VLA support is broken, so I don't
doubt that there are examples, but I'm curious and don't know of any.

The "are not implemented" above sounds fairly broken to me. The
official position on VLA's hasn't changed in a number of years,
despite numerous revisions to gcc.
 
G

Guest

Randy said:
Harald van Dijk wrote
(in article
Randy Howard wrote:

Could you give an example where current gcc versions miscompile or
refuse to compile a program with a valid use of VLA's?

Do you need an example when they explicitly say:

"The C99 semantics of variable length arrays (VLAs) are not
fully implemented by the existing GCC extension: the concept of
variably modified (VM) types, and the rules for what identifiers
can be declared with VLA or VM types, are not implemented (for
example, GCC allows elements of VM type in a structure with
block scope); while the syntax for arrays to be declared with
[*] in parameter declarations is present, the semantics are not;
and in general the implementation of VLAs has not been checked
against C99 requirements."

?

Yes, I would like an example, because while I can easily find invalid
code that gcc accepts from that quote, I cannot find valid code that
gcc doesn't accept by myself.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,184
Messages
2,570,973
Members
47,529
Latest member
JaclynShum

Latest Threads

Top