Ensure unreferenced static symbols aren't omitted by clang (either marking them __attribute__((used)) or making them non-static)

gdb/testsuite/
       * gdb.base/catch-syscall.c: Make unreferenced statics non-static to
       ensure clang would not discard them.
       * gdb.base/gdbvars.c: Ditto.
       * gdb.base/memattr.c: Ditto.
       * gdb.base/whatis.c: Ditto.
       * gdb.python/py-prettyprint.c: Ditto.
       * gdb.trace/actions.c: Ditto.
       * gdb.cp/ptype-cv-cp.cc: Mark unused global const int as used to
       ensure clang would not discard it.
This commit is contained in:
David Blaikie 2014-04-10 23:45:28 -07:00
parent bfd3963214
commit 2abc3f8d59
8 changed files with 32 additions and 20 deletions

View file

@ -230,7 +230,7 @@ struct nullstr
struct string_repr string_1 = { { "one" } };
struct string_repr string_2 = { { "two" } };
static int
int
eval_func (int p1, int p2, int p3, int p4, int p5, int p6, int p7, int p8)
{
return p1;