Re: Library bloat ?
Asking the compiler to remove functions that are never called is an interesting idea though. I would guess it is technically possible.
It used to be standard on optimising compilers back when computer memories were measured in kilobytes. Also libraries were just collections of relocatable routines and the loader picked only the ones needed, rather than today's shared libraries which contain all the code and hope to amortise the cost across all programs that use the library. Given that we're tending towards containers that run single apps maybe shared libraries are not necessarily a good idea any more. (See also unikernels.)