https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118005
--- Comment #8 from Alejandro Colomar <alx at kernel dot org> --- (In reply to Sam James from comment #7) > (In reply to Alejandro Colomar from comment #6) > > (In reply to Sam James from comment #3) > > > The boundary doesn't exist if it's being inlined. > > > > [[gnu::noipa]] is stronger and prevents any inlining (it's basically telling > > the compiler to ignore 'inline'). So, [[gnu::noipa]] enforces the boundary, > > even if I'm using the inline keyword. > > Then it's not inline. My point is that your original intention is invalid, > it doesn't make any sense. > > [...] your original > usecase doesn't make sense at all. The thing is that [[gnu::noipa]] is wrapped within preprocessor conditionals. When compiling my library, the compiler only sees 'inline', but when a user compiles against my library, it would see 'inline [[gnu::noipa]]'. That allows me to write the definitions in the header file, and have the library internals inlined as much as possible, while keeping the boundary of the library.