Forum > Suggestions
Proposition — new modifier to force compiler to inline or throw warning/error
flowCRANE:
This is only a free proposition.
Currently we have a inline modifier, which may or may not cause the compiler to inline a subroutine. There is also noinline to prevent compiler from inlining. But there is no modifier to force FPC to inline, so if the compiler can inline, it do so but if not, the appropriate compilation warning/error should be thrown (in the case of error, compilation should be aborted). IDK if currently is it possible to check if a given inlined subroutine was actually inlined or not, but AFAIK it's not.
My proposition is to use new doinline or forceinline keyword.
Bart:
--- Quote from: furious programming on November 06, 2023, 02:02:54 pm ---IDK if currently is it possible to check if a given inlined subroutine was actually inlined or not, but AFAIK it's not.
--- End quote ---
If the compiler does not inline, it'll give a hint/warning (one of the 2, too lazy to look it up).
Bart
Eugene Loza:
--- Quote ---it'll give a hint/warning
--- End quote ---
Note: Call to subroutine "$1" marked as inline not inlined
flowCRANE:
I'm aware of this, but the compiler generates a note that is filtered by default in the message window. However, when I turn off filtering to see this note, there are hundreds of items in the message window and it is difficult to find anything, especially in the case of a large project for which the compiler generates hundreds/thousands of notes.
If you at least raised the rank from a note to a warning, I wouldn't need new modifiers to always know what's going on.
Marc:
Is there reason why you want a forced inline ? IMO if the compiler diceides a routine ins't inlined, there is a reason for it, and I don't see a reason why forcing it would help
Navigation
[0] Message Index
[#] Next page