[Issue 14690] pragma(inline, true) functions must have their bodies emitted in the .di file
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Jun 6 06:37:44 UTC 2020
https://issues.dlang.org/show_bug.cgi?id=14690
Walter Bright <bugzilla at digitalmars.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |bugzilla at digitalmars.com
--- Comment #2 from Walter Bright <bugzilla at digitalmars.com> ---
This may not be solvable in the general case, consider:
enum T = true;
pragma(inline, T) int fun(int a) { return a; }
The .di files are generated without having the semantic pass run. Hence, T is
unknown when the pragma is encountered, i.e. whether it evaluates to true or
false is unknown.
Emitting the function body when T is false would be a mistake.
--
More information about the Digitalmars-d-bugs
mailing list