[Bug 148] New: gcc inline asm instruction template must be a constant char string regression
via D.gnu
d.gnu at puremagic.com
Sat Aug 9 07:12:49 PDT 2014
http://bugzilla.gdcproject.org/show_bug.cgi?id=148
Bug ID: 148
Summary: gcc inline asm instruction template must be a constant
char string regression
Product: GDC
Version: 4.9.x
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: Normal
Component: gdc
Assignee: ibuclaw at gdcproject.org
Reporter: art.08.09 at gmail.com
void main() {
asm {""~"" ; } // => instruction template must be a constant char string
}
Just tried to recompile some programs that used to build with an old GDC
version, and found this. It's a regression; at least string concatenation used
to work w/ 'gdc 0.31 - r748:ab99d67f04c2, using dmd 2.057'. Now it seems the
compiler doesn't like anything other than a string literal. Which means that
generating asms inside templates, based on type and size became impossible, at
least directly. (The original code that triggered this was selecting op
suffixes based on size)
Would it be possible to accept any expression that can be evaluated at CT and
returns a string? Eg
enum E = ""~"";
asm {E ; } // => unimplemented: D inline assembler statements are not
supported in GDC.
asm {mixin(""~"") ; } // ditto
(These two did NOT work previously, so this, unlike the example above, would be
an enhancement)
--
You are receiving this mail because:
You are watching all bug changes.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/d.gnu/attachments/20140809/21d683f6/attachment.html>
More information about the D.gnu
mailing list