On Tue, Jan 29, 2019 at 4:49 PM Jakub Jelinek <ja...@redhat.com> wrote: > > On Tue, Jan 29, 2019 at 04:29:59PM -0500, Jason Merrill wrote: > > On Tue, Jan 29, 2019 at 1:38 PM Jakub Jelinek <ja...@redhat.com> wrote: > > > > > > Emitting this warning for internal linkage functions makes no sense to me, > > > the ABI of those functions is solely under control of the compiler that > > > knows the callee as well as all callers and can do anything it wants. > > > I've added DECL_PRESERVE_P to the test, so if somebody uses used attribute > > > and accesses those from inline assembly, they get warning. > > > > Calling an affected function from inline assembly seems extremely > > Ok, can drop that. > > > unlikely, so I'd probably just check TREE_PUBLIC. Why do you also > > check DECL_EXTERNAL? > > I thought TREE_PUBLIC might not be set on DECL_EXTERNAL fndecls, but it > seems it is set. > > So, like this then (if it passes bootstrap/regtest)?
OK. Jason