AAAAAAAAAAAHHHHH!!! (MinGW bugs)

This is a discussion on AAAAAAAAAAAHHHHH!!! (MinGW bugs) within the General Discussions forums, part of the Community Boards category; A week and a half ago, I started a new personal project using mingw and so far I have encountered ...

  1. #1
    Registered User NeonBlack's Avatar
    Join Date
    Nov 2007
    Posts
    435

    AAAAAAAAAAAHHHHH!!! (MinGW bugs)

    A week and a half ago, I started a new personal project using mingw and so far I have encountered several bugs which produced incorrect compiled code.

    So what I'll typically do in a case like this is make a copy of the file and starting paring it down in chunks to create the Smallest Compilable Example which Demonstrates the Problem (R).

    But as some point, the code would start compiling correctly and so would the original code.

    The example from yesterday that pushed me over the edge: What I originally wrote was something like this:
    Code:
    for (int i=n; i>=0; --i)
    But the condition kept failing, and i kept decrementing into negative numbers. I changed it to
    Code:
    for (int i=n; i>-1; --i)
    and it worked the way it was supposed to. I changed it back, and the same thing happened!

    I copied the file and started deleting other methods and class variables without touching the offending part of the code, recompiling after every big chunk I deleted and at some point, it start working correctly. I recompiled the original code, and it worked too!

    This is not the first time this has happened, and since I can't reproduce the problem, I can't even file a bug.

    I just came on to complain and to say "Sayonara, GCC!"
    I copied it from the last program in which I passed a parameter, which would have been pre-1989 I guess. - esbo

  2. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    22,264
    Which version of the MinGW port of GCC are you using? I noticed that the official 4.4.0 version is still pretty buggy.
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  3. #3
    l'Anziano DavidP's Avatar
    Join Date
    Aug 2001
    Location
    Plano, Texas, United States
    Posts
    2,738
    hmm. I've never had any problems with bugs in GCC.
    Last edited by DavidP; 09-30-2009 at 11:45 AM.
    My Website

    "Circular logic is good because it is."

  4. #4
    Registered User NeonBlack's Avatar
    Join Date
    Nov 2007
    Posts
    435
    Hey laserlight. It's 4.3.3 from the package I downloaded here because I found that building boost was a PITA.

    Looking closer at that site, I just realized that it includes the TDM GCC build. I did not notice that before. I had been using the previous version since last spring with no problems.

    So maybe I'll try a previous version of the main build until it gives me problems.

    Thanks! I wouldn't have seen that if I hadn't gone back to the site. (It said tdm in --version, but I ignored it as part of a huge meaningless string of letters )
    I copied it from the last program in which I passed a parameter, which would have been pre-1989 I guess. - esbo

  5. #5
    l'Anziano DavidP's Avatar
    Join Date
    Aug 2001
    Location
    Plano, Texas, United States
    Posts
    2,738
    If you can get the bug to reproduce, you should immediately open up the assembly dump and post the assembly code here, 'cause I'd be interesting in seeing the assembly generated. You can do this by calling:

    objdump -d [executable file name]

    on the command line.
    My Website

    "Circular logic is good because it is."

  6. #6
    glo
    glo is offline
    Registered User
    Join Date
    May 2006
    Posts
    169
    Quote Originally Posted by NeonBlack View Post
    for (int i=n; i>=0; --i)
    You didn't say what n was, is it initialized? in which case, to what? and where?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Mingw and elcipse HELP
    By Rob4226 in forum Windows Programming
    Replies: 1
    Last Post: 03-04-2008, 01:35 AM
  2. MinGW thread-safe runtime libraries
    By Mario F. in forum C++ Programming
    Replies: 3
    Last Post: 08-21-2006, 09:15 AM
  3. Free compiler for commercial development? (mingw?)
    By kook44 in forum Windows Programming
    Replies: 8
    Last Post: 01-07-2006, 09:32 AM
  4. compiling mingw to enable timeSetEvent
    By underthesun in forum Windows Programming
    Replies: 2
    Last Post: 02-02-2005, 06:00 PM
  5. Need help fixing bugs in data parsing program
    By daluu in forum C Programming
    Replies: 8
    Last Post: 03-27-2003, 06:02 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21