This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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!


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]