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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-checking

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
With release checking I see

t.C:3:14: warning: 'static int S::operator[](int)' may be a static member
function only with '-std=c++23' or '-std=gnu++23' [-Wc++23-extensions]
    3 |   static int operator[] (int x) { int a[2]; return a[x]; }
      |              ^~~~~~~~
t.C: In function 'int f()':
t.C:8:10: error: lvalue required as increment operand
    8 |   ++s[0,1];
      |          ^
t.C: At global scope:
t.C:13:1: error: '$' does not name a type
   13 | $ cat z2.cc
      | ^
t.C:18:23: error: redefinition of 'template<class T> int f()'
   18 | template<class T> int f ()
      |                       ^
t.C:5:23: note: 'template<class T> int f()' previously declared here
    5 | template<class T> int f ()
      |                       ^

Reply via email to