[Issue 1338] New: cygwin/gdc compilation error for legal code (variadic templates)
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Jul 12 16:44:31 PDT 2007
http://d.puremagic.com/issues/show_bug.cgi?id=1338
Summary: cygwin/gdc compilation error for legal code (variadic
templates)
Product: DGCC aka GDC
Version: 0.23
Platform: PC
OS/Version: Windows
Status: NEW
Severity: major
Priority: P2
Component: glue layer
AssignedTo: dvdfrdmn at users.sf.net
ReportedBy: tortoise_74 at yahoo.co.uk
The following code fails to compile under gdc on cygwin:
---
import std.stdio;
void myWritefln(T...)(T args)
{
foreach(arg; args)
writef("%s", arg);
writefln();
}
void main() {
myWritefln("Hi! ", 5, " that's all.");
}
---
F:\projects\Agenda>gdc --version
gdc (GCC) 3.4.4 (cygming special, gdc 0.23, using dmd 1.007))
F:\projects\Agenda>gdc test2.d
cc1d: warning: command line option "-iprefix" is valid for C/C++/ObjC/ObjC++
but
not for D
test2.d:3: found '...' when expecting ')'
test2.d:3: semicolon expected following function declaration
test2.d:3: Declaration expected, not ')'
test2.d:5: no identifier for declarator args
test2.d:5: semicolon expected, not ')'
test2.d:5: Declaration expected, not ')'
test2.d:8: no identifier for declarator writefln
test2.d:9: unrecognized declaration
It works fine with dmd.
I am also informed it works with the following:
gdc (GCC) 4.1.1 20060524 ( (gdc 0.23, using
dmd 1.007))" (Linux x64 version):
See the newsgroup discussion for context:
http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D.learn&article_id=8580
--
More information about the D.gnu
mailing list