digitalmars.D - readf() compiler error message weirdness (CTFE-related?)
- David Nadlinger (18/18) Feb 06 2011 I have always been pleased to see improvements in compile time code
- Andrei Alexandrescu (3/21) Feb 06 2011 This is a major bug because it impacts privacy. Please file to bugzilla.
- Andrew Wiley (7/25) Feb 06 2011 ks
- David Nadlinger (9/12) Feb 06 2011 This seems way more likely than something in DMD going wild, and that's
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
Feb 06 2011
On 2/6/11 10:48 AM, David Nadlinger 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? DavidThis is a major bug because it impacts privacy. Please file to bugzilla. Andrei
Feb 06 2011
On Sun, Feb 6, 2011 at 9:48 AM, David Nadlinger <see 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 er=rormessage 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 loo=kslike this (note the missing ampersand): =97=97=97 import std.stdio; void main() { int e; readf( "%d", e ); } =97=97=97 Any idea what on earth could be going on here? DavidOn 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?
Feb 06 2011
On 2/6/11 8:13 PM, Andrew Wiley wrote: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?This seems way more likely than something in DMD going wild, and that's precisely the reason I asked here first before opening a bug report. The idea that it could have something to do with compile-time code execution only came to my mind because I stumbled over this while trying to trace down a CTFE-related issue anyway… I'll investigate what's expanding the star and open a bug if this really has something to do with DMD against all odds. David
Feb 06 2011