`static` on module-level functions
    Richard (Rikki) Andrew Cattermole 
    richard at cattermole.co.nz
       
    Fri Jul  7 03:18:53 UTC 2023
    
    
  
Yes, static on a free-function does not do anything.
```
; [#uses = 0]
; Function Attrs: uwtable
define void @void onlineapp.func()() #0 {
   ret void
}
```
```
; [#uses = 0]
; Function Attrs: uwtable
define void @void onlineapp.func()() #0 {
   ret void
}
```
Looks identical to me (LDC, LLVM IR).
As for inlining, backends like LLVM will freely inline if they feel it 
is a good idea. You don't need to use the pragma, it only overrides the 
logic.
    
    
More information about the Digitalmars-d-learn
mailing list