http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52595
Bug #: 52595
Summary: Incorrect parsing of commas in non-static data member
initializers
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: jeremy at jeremyms dot com
Target Milestone: ---
This code should compile, but does not.
template
void foo(const long (&arr)[N]) {}
void bar() {
foo({1,2,3});
}
See discussion here:
https://groups.google.c
++
Assignee: unassigned at gcc dot gnu.org
Reporter: jeremy at jeremyms dot com
Target Milestone: ---
See example program below. Works in clang and MSVC. Fails in GCC 7.1 through
trunk.
#include
#include
#include
template
struct span {
using value_type = T;
span(std
++
Assignee: unassigned at gcc dot gnu.org
Reporter: jeremy at jeremyms dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61994
--- Comment #1 from Jeremy Maitin-Shepard ---
With gcc 4.9.1:
The following test program produces an ICE:
typedef unsigned long limb_t __attribute__ ((__vector_size__ (16),
__may_alias__));
struct X {
limb_t limb = {1,1};
};
const X table[1