H1 2015 Priorities and Bare-Metal Programming

Daniel Kozák via Digitalmars-d digitalmars-d at puremagic.com
Tue Feb 3 00:03:05 PST 2015


V Mon, 02 Feb 2015 21:53:43 +0000
Dicebot via Digitalmars-d <digitalmars-d at puremagic.com> napsáno:

> On Monday, 2 February 2015 at 21:19:05 UTC, Walter Bright wrote:
> > On 2/2/2015 9:17 AM, H. S. Teoh via Digitalmars-d wrote:
> >> Walter seems to dislike forced inlining for various reasons, 
> >> preferring
> >> inlining as a hint at the most, and he probably has a point in 
> >> most
> >> cases (let the compiler make the judgment). But in other 
> >> cases, such as
> >> the one in question, the user needs to override the compiler's 
> >> decision.
> >> Currently there's no way to do that, and it's a showstopper 
> >> for those
> >> users.
> >
> > This is a settled issue. After all, I wrote:
> >
> > http://wiki.dlang.org/DIP56
> 
> Erm. Quoting the DIP: "If a pragma specifies always inline, 
> whether or not the target function(s) are actually inlined is 
> implementation defined, although the implementation will be 
> expected to inline it if practical."
> 
> This is exactly the absolutely unacceptable part that makes your 
> DIP useless and last discussion has stalled (from my POV) exactly 
> at the point where you refused to negotiate any compromises on 
> that matter.

Ok why not add some WARN level?

pragma(inline, true, WARN_LEVEL);  // always inline

WARN_LEVEL = 0 // no warning or error is print
WARN_LEVEL = 1 // warning
WARN_LEVEL = 2 // error

It should be easily control by version condition



More information about the Digitalmars-d mailing list