Skip to content
Commit 695e9773 authored by Bruno Larsen's avatar Bruno Larsen
Browse files

gdb/testsuite: Fix FAILs in gdb.linespec/cpcompletion.exp when using clang

When using clang 16.0.0 to test gdb.linespec/cpcompletion.exp, I get 99
unexpected failures.  They all fail to produce a complete list of
completion options for a function, either overload2_function,
overload3_function or anon_ns_function.  This happens because clang is
optimizing them away, since they are never used.

Fix this by adding __attribute__((used)) to all declarations to the
aforementioned functions.
parent 5fb0e308
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment