aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Sebor <msebor@redhat.com>2020-06-05 14:59:16 -0600
committerMartin Sebor <msebor@redhat.com>2020-06-05 15:02:09 -0600
commit3a73a6adb605df1462be176442851b5a37839fc0 (patch)
tree9d484ac14775c29c88dadd1cc72a8970c44f7678
parentcecc73af4980004502f4c327b6c639125defb379 (diff)
downloadgcc-3a73a6adb605df1462be176442851b5a37839fc0.zip
gcc-3a73a6adb605df1462be176442851b5a37839fc0.tar.gz
gcc-3a73a6adb605df1462be176442851b5a37839fc0.tar.bz2
Temporarily remove an unintentionally commited test.
gcc/testsuite/ChangeLog: * g++.dg/warn/Wnonnull5.C: Temporarily remove.
-rw-r--r--gcc/testsuite/g++.dg/warn/Wnonnull5.C108
1 files changed, 0 insertions, 108 deletions
diff --git a/gcc/testsuite/g++.dg/warn/Wnonnull5.C b/gcc/testsuite/g++.dg/warn/Wnonnull5.C
deleted file mode 100644
index 8b25d2d..0000000
--- a/gcc/testsuite/g++.dg/warn/Wnonnull5.C
+++ /dev/null
@@ -1,108 +0,0 @@
-/* PR c++/86568 - -Wnonnull warnings should highlight the relevant argument
- not the closing parenthesis.
- { dg-do compile }
- { dg-options "-O2 -Wall" } */
-
-#define NONNULL __attribute__ ((nonnull))
-
-#if __cplusplus < 201103L
-# define nullptr __null
-#endif
-
-struct S
-{
- void
- f0 (const void*) const; // { dg-message "in a call to non-static member function 'void S::f0\\(const void\\*\\) const'" }
-
- void
- f1 (const void*) const; // { dg-message "in a call to non-static member function 'void S::f1\\(const void\\*\\) const'" }
-
- void
- f2 (const void*) const; // { dg-message "in a call to non-static member function 'void S::f2\\(const void\\*\\) const'" }
-
- NONNULL void
- f3 (const void*, const void*); // { dg-message "in a call to function 'void S::f3\\(const void\\*, const void\\*\\)' declared 'nonnull'" }
-
- NONNULL void
- f4 (const void*, const void*); // { dg-message "in a call to function 'void S::f4\\(const void\\*, const void\\*\\)' declared 'nonnull'" }
-
- NONNULL void
- f5 (const void*, const void*); // { dg-message "in a call to function 'void S::f5\\\(const void\\*, const void\\*\\)' declared 'nonnull'" }
-
- NONNULL void
- f6 (const void*, const void*); // { dg-message "in a call to function 'void S::f6\\\(const void\\*, const void\\*\\)' declared 'nonnull'" }
-};
-
-void warn_nullptr_this ()
-{
- ((S*)nullptr)->f0 (""); // { dg-warning "3:'this' pointer null" "pr86568" { xfail *-*-* } }
- // { dg-warning "this' pointer null" "pr86568" { target *-*-* } .-1 }
-}
-
-void warn_null_this_cst ()
-{
- S* const null = 0;
- null->f1 (""); // { dg-warning "3:'this' pointer null" }
-}
-
-void warn_null_this_var ()
-{
- S* null = 0;
- null->f2 (&null); // { dg-warning "3:'this' pointer null" "pr86568" { xfail *-*-* } }
- // { dg-warning "'this' pointer null" "pr86568" { target *-*-* } .-1 }
-}
-
-void warn_nullptr (S s)
-{
- s.f3 (nullptr, &s); // { dg-warning "9:argument 1 null where non-null expected" "pr86568" { xfail *-*-* } }
- // { dg-warning "argument 1 null where non-null expected" "pr86568" { target *-*-* } .-1 }
- s.f3 (&s, nullptr); // { dg-warning "13:argument 2 null where non-null expected" "pr86568" { xfail *-*-* } }
- // { dg-warning "argument 2 null where non-null expected" "pr86568" { target *-*-* } .-1 }
-}
-
-
-void warn_null_cst (S s)
-{
- void* const null = 0;
- s.f4 (null, &s); // { dg-warning "9:argument 1 null where non-null expected" }
- s.f4 (&s, null); // { dg-warning "13:argument 2 null where non-null expected" }
-}
-
-void warn_null_var (S s)
-{
- void* null = 0;
- s.f5 (null, &s); // { dg-warning "9:argument 1 null where non-null expected" "pr86568" { xfail *-*-* } }
- // { dg-warning "argument 1 null where non-null expected" "pr86568" { target *-*-* } .-1 }
- s.f5 (&s, null); // { dg-warning "16:argument 2 null where non-null expected" "pr86568" { xfail *-*-* } }
- // { dg-warning "argument 2 null where non-null expected" "pr86568" { target *-*-* } .-1 }
-}
-
-void warn_null_cond (S s, void *null)
-{
- if (null)
- return;
-
- s.f6 (null, &s); // { dg-warning "9:argument 1 null where non-null expected" "pr86568" { xfail *-*-* } }
- // { dg-warning "argument 1 null where non-null expected" "pr86568" { target *-*-* } .-1 }
- s.f6 (&s, null); // { dg-warning "13:argument 2 null where non-null expected" "pr86568" { xfail *-*-* } }
- // { dg-warning "argument 2 null where non-null expected" "pr86568" { target *-*-* } .-1 }
-}
-
-
-typedef NONNULL void Fvp (const void*, const void*);
-
-void warn_fptr_null_cst (Fvp *p)
-{
- void* const null = 0;
- p (null, ""); // { dg-warning "6:argument 1 null where non-null expected" }
- p ("", null); // { dg-warning "10:argument 2 null where non-null expected" }
-}
-
-typedef NONNULL void (S::*SMemFvp) (const void*, const void*);
-
-void warn_memfptr_null_cst (S *p, SMemFvp pmf)
-{
- void* const null = 0;
- (p->*pmf) (null, ""); // { dg-warning "14:argument 1 null where non-null expected" }
- (p->*pmf) ("", null); // { dg-warning "18:argument 2 null where non-null expected" }
-}