https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95301
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Reduced:
template<typename T>
struct range {
int start;
int limit;
range():
start(1, limit(2) // missing ) after 1
{ }
};
template<typename T>
struct _no_inline_box_init : T {};
Which gives:
95301.cc:10:10: error: declaration of template parameter 'T' shadows template
parameter
10 | template<typename T>
| ^~~~~~~~
95301.cc:1:10: note: template parameter 'T' declared here
1 | template<typename T>
| ^~~~~~~~
95301.cc:12: error: expected '}' at end of input
95301.cc:2:14: note: to match this '{'
2 | struct range {
| ^
95301.cc: In constructor 'range<T>::range()':
95301.cc:6:23: error: expression cannot be used as a function
6 | start(1, limit(2) // missing ) after 1
| ^
95301.cc:8:1: error: expected '{' before '}' token
8 | };
| ^
95301.cc: At global scope:
95301.cc:11:35: error: expected ';' at end of input
11 | struct _no_inline_box_init : T {};
| ^
| ;
Compared to Clang's:
95301.cc:8:1: error: expected ')'
};
^
95301.cc:6:12: note: to match this '('
start(1, limit(2) // missing ) after 1
^
1 error generated.