News:

As usual while waiting for the next release - don't forget to check the nightly builds in the forum.

Main Menu

GCC 4.1.2 available (now relocatable!)

Started by TDragon, February 26, 2007, 03:20:04 AM

Previous topic - Next topic

Biplab

If you don't mind, what is the difference between this build and the earlier one. :?
Be a part of the solution, not a part of the problem.

TDragon

Quote from: Biplab on February 27, 2007, 06:13:14 PM
If you don't mind, what is the difference between this build and the earlier one.
It may be installed anywhere (not restricted to C:\MinGW), without needing to add the additional directories I'd mentioned previously to Code::Blocks' compiler search paths. (Note: I haven't yet tried installing it in a path with spaces, such as "Program Files".)
[url="https://jmeubank.github.io/tdm-gcc/"]https://jmeubank.github.io/tdm-gcc/[/url] - TDM-GCC compiler suite for Windows (GCC 9.2.0 2020-03-08, 32/64-bit, no extra DLLs)

Biplab

Be a part of the solution, not a part of the problem.

kylove

GCC 4.1.2 Bug

//code
#include <iostream>
using namespace std;

int main()
{
   long double pi=3.141592653589793;
   cout<<"pi=="<<pi<<endl;
   return 0;
}

//Run
pi==-8.87961e+043

//Why?

TDragon

Quote from: kylove on February 28, 2007, 02:04:44 PM
//Why?
After some poking around, I can only say I don't know. Something I find interesting is that GCC 3.4.5's std::cout performs as expected, but its printf() exhibits the same behavior as 4.1.2's cout (and printf). This points to changes in libstdc++.

The problem is only with the output's formatting, as the following program works as expected:

#include <iostream>
int main()
{
    long double pi = 3.141592653589793L;
    int add;
    std::cin >> add;
    std::cout << "add: " << add << "\npi + add: " << (double)(pi + add) << std::endl;
    return 0;
}

Note the cast to double -- cout appears to correctly interpret doubles. I believe this program proves that the long double's internal representation is correct.
[url="https://jmeubank.github.io/tdm-gcc/"]https://jmeubank.github.io/tdm-gcc/[/url] - TDM-GCC compiler suite for Windows (GCC 9.2.0 2020-03-08, 32/64-bit, no extra DLLs)

runtime

tsk tsk tsk C style casts  :P

Anyways...if it's this easy to build gcc (not very easy to figure out though ;) ) why doesn't GNU make official windows binaries?


Ceniza

I remember seeing that problem before, but I can't remember the gcc version neither if it was printf or cout. The explanation I got was that gcc had problems displaying and, IIRC, operating on 80-bit float numbers (long double). Maybe that's the reason Digital Mars likes to say their C++ compiler is able to work with 80-bit floats without any problems.
I just tried that with GCC 4.1.2 on Linux, using both cout and printf. It had no problems displaying the right value of pi, so I guess it's a Windows only problem.

Quote from: runtime on March 01, 2007, 01:20:01 AMAnyways...if it's this easy to build gcc (not very easy to figure out though ;) ) why doesn't GNU make official windows binaries?

GNU doesn't even make Linux binaries, they only provide the source, it's up to you, the OS distribution or someone else to build it.

stahta01

#22
Quote from: runtime on March 01, 2007, 01:20:01 AM
tsk tsk tsk C style casts  :P

Anyways...if it's this easy to build gcc (not very easy to figure out though ;) ) why doesn't GNU make official windows binaries?



One, GNU does NOT normally offer binary for Windows at all.
Two, MinGW who does is waiting for all of the GCC front-ends the MinGW supports to work to an acceptable level.
MinGW says only the C front-end works at an acceptable level for them.
And, MinGW says the Ada and Java front-ends are very broken.

Note, there are websites that offer Ada and Java front-ends for GCC 4.x that work under windows so take the reason with a grain of salt.

Tim S
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

runtime

Well, someone should set up official binaries site...

But it's a heck of a lot easier to compile and all on Linux...you don't need binaries...


kylove

Run Command:

gcc/g++ -m64 test64bit.cpp

Result:

test64bit.cpp:1: sorry, unimplemented: 64-bit mode not compiled in



TDragon

Quote from: kylove on March 02, 2007, 09:03:55 PM
64-bit mode not compiled in
The error message is quite correct: 64-bit mode was indeed not compiled in. Although I'll continue looking into the possibilities of a GCC for Windows that can produce 64-bit executables, the fact of the matter is that there are a whole slew of accompanying utilities (binutils, glibc, and various other related binaries), normally provided by the MinGW developers, that I would apparently need to rebuild myself with 64-bit support.
[url="https://jmeubank.github.io/tdm-gcc/"]https://jmeubank.github.io/tdm-gcc/[/url] - TDM-GCC compiler suite for Windows (GCC 9.2.0 2020-03-08, 32/64-bit, no extra DLLs)

kylove

64 bit, no one can be translated?
SOS!I will not!
Thanks!

nenin

After installation I got errors with GDB like
Application popup: gdb.exe - No Disk : There is no disk in the drive. Please insert a disk into drive \Device\Harddisk4\DR6. 
(from system log, gdb send a popup with similar content, approx. 10 times on each "run")
and then codeblocks often lost gdb in any moment. Any idea?
OS: Win2K SP4 codeblocks- last nightly, gdb- 6.3.2

TDragon

Quote from: nenin on March 06, 2007, 06:10:33 PM
After installation I got errors with GDB like
Application popup: gdb.exe - No Disk : There is no disk in the drive. Please insert a disk into drive \Device\Harddisk4\DR6. 
As I have not encountered errors like this, could you provide a minimal sample case with instructions on how to reproduce it?
[url="https://jmeubank.github.io/tdm-gcc/"]https://jmeubank.github.io/tdm-gcc/[/url] - TDM-GCC compiler suite for Windows (GCC 9.2.0 2020-03-08, 32/64-bit, no extra DLLs)

nenin

#29
Quote from: TDragon on March 06, 2007, 08:24:33 PM
Quote from: nenin on March 06, 2007, 06:10:33 PM
After installation I got errors with GDB like
Application popup: gdb.exe - No Disk : There is no disk in the drive. Please insert a disk into drive \Device\Harddisk4\DR6. 
As I have not encountered errors like this, could you provide a minimal sample case with instructions on how to reproduce it?
Absolutely nothing special in project. It compliled/debuged fine with 4.1.1 and 3.4.*
But: I replaced one harddrive and had to change letter for new one (so, I had a second pata hdd D: drive, now second hdd is sata U:). And I have a multy-card-reader with 4 letters.   
mingw is c:\wingw
codeblocks is on c:\bin\codeblocks
I made some tests exactly now: old code (from 4.1.1) are debuged normally. Issue is with debug version from 4.1.2
I attached some project, it is placed in c:\MinGW\projects\hello_tst\
Errors with lost connection gdb<-> codeblocks recovered by rollback to older svn.

[attachment deleted by admin]