This is the mail archive of the gcc-bugs@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]

[Bug c++/86773] New: GCC accepts junk before fold expressions


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

            Bug ID: 86773
           Summary: GCC accepts junk before fold expressions
           Product: gcc
           Version: 9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: mickey.veksler at gmail dot com
  Target Milestone: ---

template <typename ... Param>
auto work(Param && ...param)
{
        return ("hi" ... / param);
}

int main()
{
        std::cout << work(1.0, 2.0, 5, 4.0) << "\n";
}


GCC simply ignores the "hi" junk before the fold expression, with no
diagnostics.

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