From ca0f27b5a498fdbdc04a18475361f4ababc8c6a0 Mon Sep 17 00:00:00 2001 From: Alexander Monakov Date: Wed, 9 Dec 2015 18:42:41 +0300 Subject: [PATCH] 980716-1.c: Avoid undefined behavior due to passing terminating NULL as int rather than pointer. * gcc.c-torture/execute/980716-1.c: Avoid undefined behavior due to passing terminating NULL as int rather than pointer. From-SVN: r231458 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gcc.c-torture/execute/980716-1.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index e9c102079e8..babbdf88e00 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2015-12-09 Alexander Monakov + + * gcc.c-torture/execute/980716-1.c: Avoid undefined behavior due to + passing terminating NULL as int rather than pointer. + 2015-12-09 Marek Polacek PR tree-optimization/66949 diff --git a/gcc/testsuite/gcc.c-torture/execute/980716-1.c b/gcc/testsuite/gcc.c-torture/execute/980716-1.c index 91e5518d53f..14f46af4a54 100644 --- a/gcc/testsuite/gcc.c-torture/execute/980716-1.c +++ b/gcc/testsuite/gcc.c-torture/execute/980716-1.c @@ -20,7 +20,7 @@ stub(int num, ...) int main() { - stub(1, "ab", "bc", "cx", 0); + stub(1, "ab", "bc", "cx", (char *)0); exit (0); } -- 2.30.2