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

            Bug ID: 120385
           Summary: Incorrectly accepts array prvalues with certain
                    operators
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: language.lawyer at gmail dot com
  Target Milestone: ---

GCC 14 started accepting array prvalue operands where they are not allowed
(https://godbolt.org/z/6hj5YbTx7)

int main()
{
        using IA = int[];

        void(+IA{ 1, 2, 3 });
        void(*IA{ 1, 2, 3 });
        void(IA{ 1, 2, 3 } + 0);
        void(IA{ 1, 2, 3 } - 0);
        void(0 + IA{ 1, 2, 3 });
        void(IA{ 1, 2, 3 } - IA{ 1, 2, 3 });
}

All of the void(...) lines shall make the program ill-formed

Reply via email to