<html>
<head>
<base href="http://bugzilla.gdcproject.org/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - gcc inline asm instruction template must be a constant char string regression"
href="http://bugzilla.gdcproject.org/show_bug.cgi?id=148">148</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>gcc inline asm instruction template must be a constant char string regression
</td>
</tr>
<tr>
<th>Product</th>
<td>GDC
</td>
</tr>
<tr>
<th>Version</th>
<td>4.9.x
</td>
</tr>
<tr>
<th>Hardware</th>
<td>All
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>Normal
</td>
</tr>
<tr>
<th>Component</th>
<td>gdc
</td>
</tr>
<tr>
<th>Assignee</th>
<td>ibuclaw@gdcproject.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>art.08.09@gmail.com
</td>
</tr></table>
<p>
<div>
<pre>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)</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are watching all bug changes.</li>
</ul>
</body>
</html>