[Bug c/88523] New: Allow slick and sick incomplete variably modified function return type.

sasho648 at gmail dot com gcc-bugzilla@gcc.gnu.org
Sun Dec 16 20:25:00 GMT 2018


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

            Bug ID: 88523
           Summary: Allow slick and sick incomplete variably modified
                    function return type.
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: sasho648 at gmail dot com
  Target Milestone: ---

Consider the following code:

main()
{
        auto a(char a, struct t { char t[a] } t)
        {
        }
}

It currently ICEs and has no actual purpose but what if we use this opportunity
to introduce:

main()
{
        auto struct t main(char a, struct t { char t[a] } t)
        {
                return t;
        }
}

The above code will complete the composite type of main on each instance after
its arguments were evaluated.


More information about the Gcc-bugs mailing list