Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Language

C++

Compiler

gcc 12.1.0

Options
Don't Use Boost
Compiler Default
no pedantic
Raw compiler options
-std=c++20 -O3 -Werror

$ g++ prog.cc -std=c++20 -O3 -Werror
In function 'auto operator<=>(const V&, const V&)',
    inlined from 'Node* foo(Node*, const V&)' at prog.cc:33:17:
prog.cc:20:36: error: 'int __builtin_memcmp(const void*, const void*, long unsigned int)' specified bound [9223372036854775808, 18446744073709551615] exceeds maximum object size 9223372036854775807 [-Werror=stringop-overread]
   20 |     const auto c = __builtin_memcmp(x.beg, y.beg, len) <=> 0;
      |                    ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
prog.cc:17:15: note: source object allocated here
   17 |   }(x.end - x.beg, y.end - y.beg);
      |             ~~^~~
cc1plus: all warnings being treated as errors
Exit Code:
1