[Issue 3952] pragma(msg,...) has bugs + alternative idea
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Feb 5 14:57:13 PST 2013
http://d.puremagic.com/issues/show_bug.cgi?id=3952
--- Comment #11 from bearophile_hugs at eml.cc 2013-02-05 14:57:11 PST ---
(In reply to comment #10)
> Is this resolved now?
- - - - - - - - - - - - - - - - -
This doesn't work:
__ctfeWriteln("hello");
void main() {}
It gives:
temp.d(1): Error: unexpected ( in declarator
temp.d(1): Error: basic type expected, not "hello"
temp.d(1): Error: found '"hello"' when expecting ')'
temp.d(1): Error: no identifier for declarator __ctfeWriteln(int)
temp.d(1): Error: semicolon expected following function declaration
temp.d(1): Error: Declaration expected, not ')'
- - - - - - - - - - - - - - - - -
While this gives no errors but prints nothing:
int foo() {
__ctfeWriteln(1);
__ctfeWriteln("hello");
return 0;
}
enum x = foo();
void main() {}
- - - - - - - - - - - - - - - - -
I don't like the names __ctfeWriteln and __ctfeWrite, they are ugly. It's much
better to call them ctWriteln and ctWrite. They are meant to be a clean and
handy feature of the D language, not some temporary compiler-speciic hack.
- - - - - - - - - - - - - - - - -
I don't see the D docs about those two functions in the D site. They need to be
documented.
- - - - - - - - - - - - - - - - -
So this is not resolved yet.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list