This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] Fix unused static symbols so they're not dropped by clang


Several tests used file-static functions and variables that were not
referenced by the code. Even at -O0, clang omits these entities at the
frontend so the tests fail.

Since it doesn't look like these tests needed this functionality for
what they were testing, I've modified the variables/functions to
either be non-static, or marked them with __attribute__((used)).

If it's preferred that I use the attribute more pervasively, rather
than just making the entities non-static, I can provide a patch for
that (or some other preferred solution). There's certainly precedent
for both (non-static entities and __attribute__((used)) in the
testsuite already and much more of the former than the latter).

I have commit-after-review access, so just looking for sign-off here.

Thanks,
- David

Attachment: unused.diff
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]