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

Thomas Mercier <thomas.mercier.jr at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |thomas.mercier.jr at gmail dot 
com

--- Comment #13 from Thomas Mercier <thomas.mercier.jr at gmail dot com> ---
Was this feature meant to be protected by -std=c23? It doesn't appear to be in
GCC 13:

/tmp$ cat test.c
enum node_stat_item : unsigned {
        NR_LRU_BASE = -1,
        NR_INACTIVE_ANON = NR_LRU_BASE, /* must match order of LRU_[IN]ACTIVE
*/
        NR_ACTIVE_ANON,         /*  "     "     "   "       "         */
        NR_INACTIVE_FILE,
};

int main()
{}
/tmp$ gcc --version
gcc (Debian 13.2.0-10) 13.2.0
Copyright (C) 2023 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

/tmp$ gcc -std=c11 test.c
test.c:2:23: error: enumerator value outside the range of underlying type
    2 |         NR_LRU_BASE = -1,
      |                       ^
test.c:4:9: error: overflow in enumeration values
    4 |         NR_ACTIVE_ANON,         /*  "     "     "   "       "        
*/
      |

Reply via email to