digitalmars.D.bugs - [Issue 1500] New: Template Arguments, Aliases, or Typedefs Generate Error when used inside inline ASM blocks
- d-bugmail puremagic.com (48/48) Sep 13 2007 http://d.puremagic.com/issues/show_bug.cgi?id=1500
- d-bugmail puremagic.com (4/4) Oct 27 2007 http://d.puremagic.com/issues/show_bug.cgi?id=1500
- d-bugmail puremagic.com (16/16) Jan 21 2012 http://d.puremagic.com/issues/show_bug.cgi?id=1500
- d-bugmail puremagic.com (8/8) Feb 24 2012 http://d.puremagic.com/issues/show_bug.cgi?id=1500
http://d.puremagic.com/issues/show_bug.cgi?id=1500 Summary: Template Arguments, Aliases, or Typedefs Generate Error when used inside inline ASM blocks Product: D Version: 1.015 Platform: PC OS/Version: Linux Status: NEW Keywords: rejects-valid, spec Severity: major Priority: P3 Component: DMD AssignedTo: bugzilla digitalmars.com ReportedBy: johnkirollos yahoo.com Best to describe it using an example. Here is a copy of the post I've put in D forum: I made the following example to see how far can inline asm blocks use template another one) ======================================== void asm_template(T)(T Tval,T* pDest) { asm{ fld Tval; mov EAX,pDest; }//asm }//asm_template void main() { float f1=4.0; float f2=5.0; asm_template!(float)(f1,&f2); } ======================================== Here is the compilation result of the 4 statements marked above: float". In other words, why would it fail if T is correctly interpreted to float? In conclusion, it would make sense if such statement would be accepted, thus enabling writing general ASM code. --
Sep 13 2007
http://d.puremagic.com/issues/show_bug.cgi?id=1500 Walter Bright <bugzilla digitalmars.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bugzilla digitalmars.com Version|1.015 |D1 & D2 OS/Version|Linux |All Severity|major |enhancement 19:56:58 PST --- Unfortunately, the grammar accepted by the inline assembler for expressions is not the regular D grammar. It's its own animal, for compatibility with the Intel syntax. Improving it would be an enhancement request. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jan 21 2012
http://d.puremagic.com/issues/show_bug.cgi?id=1500 --- Well, it was easy for me to figured out that it's tricky to correct :) I'm not currently using pure assembly but I'll vote for it anyway. Guess it would require a certain number of votes to be taken into consideration. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Feb 24 2012