On 28/06/20 14:01 +0300, Ville Voutilainen via Libstdc++ wrote:
On Sun, 28 Jun 2020 at 13:56, Ville Voutilainen
<ville.voutilai...@gmail.com> wrote:

2020-06-28  Ville Voutilainen  <ville.voutilai...@gmail.com>

    Add a __nonnnull__ attribute to std::string's _CharT* constructor
    * include/bits/basic_string.h (string(_CharT*, const _Alloc&)):
    Add a __nonnull__ attribute.
    * testsuite/21_strings/basic_string/cons/char/nonnull.cc: New.
    * testsuite/21_strings/basic_string/cons/wchar_t/nonnull.cc: Likewise.


Hmm, let's use dg-additional-options here too, and axe the pointless
-std=gnu++11.

I agree the -std=gnu++11 isn't needed, but thre doesn't seem to be any
advantage to dg-additional-options here. The reason I suggested it for
th other tests was that it can take a target selector, so it can be
used to add options for some targets only (in the case of the variant
tests, only if the dialect is c++17 or later).

Here you want the -Wnonnull added unconditionally, with no target
selector, so dg-options works fine.

No big deal though, they work equivalently for this case.

OK for master, thanks.


Reply via email to