This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/86773] New: GCC accepts junk before fold expressions
- From: "mickey.veksler at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 01 Aug 2018 09:55:22 +0000
- Subject: [Bug c++/86773] New: GCC accepts junk before fold expressions
- Auto-submitted: auto-generated
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.