druntime icon indicating copy to clipboard operation
druntime copied to clipboard

fix: __asmtuple is not pure and etc

Open 9il opened this issue 9 years ago • 3 comments

9il avatar Jul 11 '16 09:07 9il

Hm… I suppose we'd actually need to add template parameters for the different attributes (like the nothrow, … attributes on built-in asm blocks) for this to be correct. Otherwise, templates using this might be inferred to e.g. be pure when they aren't since inline ASM can access globals, call the GC, and so on.

dnadlinger avatar Oct 11 '16 23:10 dnadlinger

Yes, but __asm already has all attributs

9il avatar Oct 12 '16 05:10 9il

@klickverbot @9il I think Ilya has a point: __asm already has the same attributes. Shall we just trust the user to know what he is doing? (one concern is optimization, once we start using some of those attributes as queues to optimization, things might go wrong...) Shouldn't these also be @trusted then?

JohanEngelen avatar Oct 09 '17 19:10 JohanEngelen