Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Language

C++

Compiler

clang HEAD 12.0.0 (https://github.com/llvm/llvm-project.git d751f86189a7f7ef2a6fe06974a5da3349b02f20)

Options
Warnings
Optimization
Boost 1.73.0
C++2a
no pedantic

$ clang++ prog.cc -Wall -Wextra -O2 -march=native -I/opt/wandbox/boost-1.73.0/clang-head/include -std=c++2a
prog.cc:12:5: warning: 'memset' will always overflow; destination buffer has size 20, but size argument is 21 [-Wfortify-source]
    memset(buf2, 'a', 21);   // C4789
    ^
prog.cc:16:5: warning: 'memcpy' will always overflow; destination buffer has size 1, but size argument is 4 [-Wfortify-source]
    memcpy(&c, &w, sizeof(wchar_t));
    ^
2 warnings generated.
Exit Code:
0