https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111437
Bug ID: 111437
Summary: Some always inline functions are incorrectly warn of
as "might not be inlinable"
Product: gcc
Version: 13.2.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: gb2985 at gmail dot com
Target Milestone: ---
Couldn't find a similar thread so my apologies if there actually was. For
starters a link to the code that made me cotton on to the issue:
https://gitlab.com/awsdert/dragonbuilder/-/blob/419c686fd59c0a40145154ef3d43b8d8b75aa29d/include/paw/pawidb.h#L34
In short it amounts to a simple LOAD, DIV, STORE set of instructions once
compiled which is undoubtedly inline-able in all situations. I had marked the
function as always inline but when gcc got to it it decided that no, those
measly few instructions are somehow not inlinable. The issue also occurs for
wrapped calls such as pawcv_gettop() calling the template generated
_pawcv_gettop(), the former existing for intellisense purposes while the latta
being what does the actual work.
I seriously doubt my system or any other details are relevant here but for what
I need to provide I'll add below (only remember one at time of posting, will
edit in rest if I can):
OS: Manjaro x64 XFCE (4.18)