Language
C++
Compiler
gcc 10.1.0
Options
Warnings
Don't Use Boost
C++2a(GNU)
no pedantic
$ g++ prog.cc -Wall -Wextra -std=gnu++2a
Exit Code:
0
Author
anonymous
almost 5 years ago
C++
gcc 10.1.0
Author
anonymous
almost 5 years ago
$ g++ prog.cc -Wall -Wextra -std=gnu++2a
prog.cc: In function 'int main()':
prog.cc:5:17: warning: ignoring return value of 'void* operator new(std::size_t)', declared with attribute 'nodiscard' [-Wunused-result]
5 | ::operator new(sizeof(int));
| ~~~~~~~~~~~~~~^~~~~~~~~~~~~
In file included from prog.cc:1:
/opt/wandbox/gcc-10.1.0/include/c++/10.1.0/new:126:26: note: declared here
126 | _GLIBCXX_NODISCARD void* operator new(std::size_t) _GLIBCXX_THROW (std::bad_alloc)
| ^~~~~~~~