no diagnostic when template argument is a reference to array of unknown bound

Hello,

The following code compiles without warnings or errors with clang++ -Wall -pedantic:

template

void f(const T&) {}

extern char test;

int main() {

f(test);

}

char test = “”;

However, quoting C++11 8.3.5-8:

If the type of a parameter includes a type of the form “pointer to array of unknown bound of T” or “reference to array of unknown bound of T,” the program is ill-formed.9

So shouldn’t clang gives at least a warning because the template parameter type in the example above is a reference to an array of unknown bound?

I’m using clang version 3.5-1ubuntu1.

Thanks,
Victor

Hello,

The following code compiles without warnings or errors with clang++ -Wall
-pedantic:

template <typename T>
void f(const T&) {}

extern char test;

int main() {
  f(test);
}

char test = "";

However, quoting C++11 8.3.5-8
<http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3376.pdf#page=196&gt;
:

If the type of a parameter includes a type of the form “pointer to array

of unknown bound of T” or “reference to array of unknown bound of T,” the
program is ill-formed.9

So shouldn't clang gives at least a warning because the template parameter
type in the example above is a reference to an array of unknown bound?

Clang implements the proposed resolution to this C++ core language bug:

http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_active.html#393