Re: [PATCH OBV] Add nowarnings in gdb.base/fileio.exp

Yao Qi
2017-05-18T08:34:15Z

Pedro Alves <palves@redhat.com> writes:

> FWIW, I think that wrapping the offending code with
>
> #pragma diagnostics push
> #pragma diagnostics ignored "-Wnonnull"
> ... stat (NULL, ...);
> #pragma diagnostics pop
>
> would be appropriate in this case. This testcase is checking that the syscalls
> on the target map back to host I/O on the gdb side, and some targets have
> slightly non-POSIX-like system calls APIs; IMHO, it's better to see warnings
> due to such mismatches instead of potentially silently miscompiling.

The diagnostic was added in gcc 4.6. Do we require gcc 4.6 to run
testsuite? I am OK with this requirement.

--
Yao (齐尧)