Language
C++
Compiler
gcc 12.2.0
Options
Don't Use Boost
C++17
-pedantic-errors
Raw compiler options
-Werror
-Wpedantic
$ g++ prog.cc -std=c++17 -pedantic-errors -Werror -Wpedantic Exit Code:
1
Author
anonymous
about 3 years ago
C++
gcc 12.2.0
Author
anonymous
about 3 years ago
$ g++ prog.cc -std=c++17 -pedantic-errors -Werror -Wpedantic prog.cc: In function 'void bar(const S&)':
prog.cc:8:12: error: invalid conversion from 'const void*' to 'void*' [-fpermissive]
8 | ::new( &s ) S{42};
| ^~
| |
| const void*
In file included from prog.cc:1:
/opt/wandbox/gcc-12.2.0/include/c++/12.2.0/new:174:65: note: initializing argument 2 of 'void* operator new(std::size_t, void*)'
174 | _GLIBCXX_NODISCARD inline void* operator new(std::size_t, void* __p) _GLIBCXX_USE_NOEXCEPT
| ~~~~~~^~~