Commit cee00f17 authored by Gary Benson's avatar Gary Benson
Browse files

Fix "'operator new' should not return NULL" errors in testsuite

When running the testsuite with clang, gdb.linespec/cpls-ops.cc
fails to compile with the following errors:
  warning: 'operator new' should not return a null pointer unless
    it is declared 'throw()' or 'noexcept' [-Wnew-returns-null]
  warning: 'operator new[]' should not return a null pointer unless
    it is declared 'throw()' or 'noexcept' [-Wnew-returns-null]

This prevents the gdb.linespec/cpls-ops.exp testcase from executing.
This commit fixes.

gdb/testsuite/ChangeLog:

	* gdb.linespec/cpls-ops.cc (dummy): New static global.
	(test_op_new::operator new): Add return statement.
	(test_op_new_array::operator new[]): Likewise.
parent efcf5fb5
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment