readf() compiler error message weirdness (CTFE-related?)

Andrew Wiley debio264 at gmail.com
Sun Feb 6 11:13:19 PST 2011


On Sun, Feb 6, 2011 at 9:48 AM, David Nadlinger <see at klickverbot.at> wrote:

> I have always been pleased to see improvements in compile time code
> execution possibilities, but today I hit what must be the weirdest DMD error
> message I've ever seen:
>
> /usr/local/bin/../include/d2/std/format.d(434): Error: can only
> Applications Desktop Documents Downloads Library Movies Music Pictures
> Public Sites test.d a pointer, not a 'int'
>
> To be honest, I have no idea how this happens, but somehow DMD picked up
> the contents of the directory the source file, test.d, resides in. It looks
> like this (note the missing ampersand):
> ———
> import std.stdio;
> void main() {
>    int e;
>    readf( "%d", e );
> }
> ———
>
> Any idea what on earth could be going on here?
>
> David
>

On 64 bit linux (Arch, running dmd on a multilib installation), I get
"/usr/include/d/std/format.d(428): Error: can only * a pointer, not a 'int'"
It almost seems like something is expanding the * syntax in your shell?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20110206/15fe3c2f/attachment-0001.html>


More information about the Digitalmars-d mailing list