Compiler not compiling properly, causing weird errors

Vladimir Panteleev thecybershadow at gmail.com
Mon Dec 10 04:32:49 PST 2007


On Sun, 09 Dec 2007 04:49:44 +0200, Bisse <dj.bisse at gmail.com> wrote:

> I'm using the latest stable version of DMD (1.015) along with Bud 3.04 and
> Derelict. I'm making an application using SDL and OpenGL and it's been working
> great so far, except that i'm getting horribly weird compiler-related errors.
>
> For example, I can be working on one part of the application, and suddenly an
> entirely different part of it starts not working. Mostly it's Access
> violations, but it can be other weird stuff too. After having encountered
> about 20 too many of these weird errors and solving them the same way every
> time, this is what I now do mostly every time I compile, and EVERY time I get
> any sort of error: I delete all the files created by the compiler - .obj,
> .exe, .map, .ksp, .rsp, and whatever else it makes. Then I recompile. Poof,
> the error is gone. It will also solve errors like the linker complaining it
> can't find a certain symbol, and similiar.
>
> I'll also sometimes get errors which force me to restructure/rewrite my code.
> For example, after half an hour I managed to pinpoint an Access violation to
> being caused by a function being CALLED - irrelevant of the argument sent to
> it, at certain points in the code, the function would simply crash the
> application if called. I didn't use it very often so taking the code out of
> the function and CTRL-C'ing it into where I used it removed the crash entirely.
>
> It's gotten to the point where I simply can't trust the compiler to compile my
> program correctly without putting arvitrary bugs into it - When I get an error
> I can't be sure if it's my fault or the compiler's fault. Please, if anyone
> knows what could cause this, or has experienced anything similiar, i'll be
> really happy for all the help I can get

If you use -inline, you have to rebuild all code from scratch. Dependencies can't be tracked correctly when code is inlined across modules.

-- 
Best regards,
 Vladimir                          mailto:thecybershadow at gmail.com


More information about the Digitalmars-d-bugs mailing list