]> git.ipfire.org Git - thirdparty/gcc.git/commit
Work around array out of bounds warning in mkdeps
authorAndreas Krebbel <krebbel@linux.ibm.com>
Thu, 16 Jan 2020 09:41:44 +0000 (10:41 +0100)
committerAndreas Krebbel <krebbel@linux.ibm.com>
Thu, 16 Jan 2020 10:09:24 +0000 (11:09 +0100)
commit3b5757ea87ad2274b841340335bf7536204e615b
treed373dc4190fd7df50d8f4abdd29e8ef7a0982ff2
parent5c06093ce90ac3fc1efe89c1897ea19b805cdd3d
Work around array out of bounds warning in mkdeps

This suppresses an array out of bounds warning in mkdeps.c as proposed
by Martin Sebor in the bugzilla.

array subscript 2 is outside array bounds of ‘const char [2]’

Since this warning does occur during bootstrap it currently breaks
werror builds on IBM Z.

The problem can be reproduced also on x86_64 by changing the inlining
threshold using: --param max-inline-insns-auto=80

Bootstrapped and regression tested on x86_64 and IBM Z.

libcpp/ChangeLog:

2020-01-16  Andreas Krebbel  <krebbel@linux.ibm.com>

PR tree-optimization/92176
* mkdeps.c (deps_add_default_target): Avoid calling apply_vpath to
suppress an array out of bounds warning.
libcpp/mkdeps.c