This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Variably sized data types and local functions
- From: "Christian Ehrhardt" <ehrhardt at mathematik dot uni-ulm dot de>
- To: gcc at gcc dot gnu dot org
- Date: Sat, 5 Apr 2003 14:22:54 +0200
- Subject: Variably sized data types and local functions
PR 8081 is basically about this piece of code (gives an ICE with all
versions of gcc):
void f (int size)
{
typedef struct { char val[size]; } block;
block retframe_block () { }
retframe_block ();
}
Now my question is: Should this be legal?
Second question: Should an actual parameter of variable size be legal, i.e.:
void f (int size)
{
typedef struct { char val[size]; } block;
void retframe_block (block b) { }
}
None of the variations I tried currently work, but I managed to get
at least three different ICEs.
regards Christian
--
THAT'S ALL FOLKS!