Questions tagged [gcc4]

Version 4.x of GCC (GNU Compiler Collection). It's the de facto standard C compiler on Linux and supports many other languages and platforms as well.

Version 4.0.0 was released on 2005-04-20. Version 4.9.4 was released on 2016-08-03.

See also:

184 questions
1
vote
3 answers

How are C++-style comments handled in GCC 4.3.3 by default?

I'm using GCC 4.3.3 on Ubuntu 9.04 64-bit and was getting errors using C++-style comments in C code. When I say "by default" in the title, I mean simply invoking gcc test.c According to the GCC 4.3.3 docs (here), this is supported...yet I got the…
Kyle Walsh
  • 2,774
  • 4
  • 27
  • 25
1
vote
1 answer

Pointer to array of opaque structures

I have an odd problem with gcc 4.3 and I wanted to know if it is a specific problem with the compiler or if it is a general C problem. Granted, I use a really odd construct, but I like it, because it allows me to enforce some rules that otherwise…
Patrick Schlüter
  • 11,394
  • 1
  • 43
  • 48
1
vote
0 answers

BOOST_STATIC_ASSERT doesnt compile on gcc 4.2 whereas it does on 3.4.6

I am porting the project to compile with 4.2 compare to 3.4.6 I get the error while compiling following code in gcc 4.2 whereas it works fine in gcc3.4.6 error: invalid application of ‘sizeof’ to incomplete type ‘boost::STATIC_ASSERTION_FAILURE’ I…
rkb
  • 10,933
  • 22
  • 76
  • 103
1
vote
3 answers

typedef - Primitive type to primitive type

Is it valid C++ to have a typedef for a primitive type to another primitive type ? typedef int long; On VS 2012, warning is issued but compiles fine. warning C4091: 'typedef ' : ignored on left of 'long' when no variable is declared But on…
Mahesh
  • 34,573
  • 20
  • 89
  • 115
1
vote
1 answer

Accessing templated methods of a templated base class

Possible Duplicate: Error calling template method in “templated-base-class” The following code compiles with MSVC10 but not with gcc 4.2.1: template class NativeWindow : public BaseQNativeWindow { public: …
Badder
  • 35
  • 1
  • 3
1
vote
1 answer

Why does gcc4 not unroll this loop?

In the gcc 4.4.6 docs it is stated: -funroll-all-loops: Unroll all loops, even if their number of iterations is uncertain when the loop isentered. I am compiling this code: int unroll(){ int i = 0; int array[1000]; do { …
franka
  • 1,867
  • 3
  • 17
  • 31
1
vote
3 answers

What is the meaning of "array type has incomplete element type"?

I have the following simple lines of code: #include #include void my_func () { GHashTable htbls[3]; /* ASSUME LINE NUMBER IS N */ /* Do something */ } int main (int argc, char *argv[]) { my_func (); return…
Shredderroy
  • 2,860
  • 2
  • 29
  • 53
1
vote
0 answers

building GCC on ARM: undefined reference to `ggc_alloc_zone_vec_rtvec_def'

I'm trying to compile GCC on synology DS109 NAS disk which is powered by Marvell Kirkwood mv6281 ARM Processor. It is currently running quite outdated GCC 4.2.3 which is the newest vesion that I found for it in binaries. I tried GCC 4.7.1 and 4.6.3…
Vladimir Still
  • 634
  • 3
  • 17
1
vote
1 answer

How to generate location independent code using GNU ARM toolchain?

I am using ARM ELF toolchain for my project. I am working on a bootloader which needs to be location independent as it will relocate it self from flash to ram upon reset. I have tried hard to figure out how to compile location independent code using…
binW
  • 13,220
  • 11
  • 56
  • 69
1
vote
1 answer

GCC4 - ARMv5 register allocations

Is there a way to ask GCC to generate code that uses the registers in a way unlike the standard ABI for that architecture. I am using an ARMv4 chip (LPC2000) and I need my fast interrupts to be faster. I have a FIQ routine, but I have to store…
Jay M
  • 3,736
  • 1
  • 24
  • 33
1
vote
1 answer

QApplication compiles with gcc 4.7 but crashes

from here http://nuwen.net/mingw.html I've downloaded gcc 4.7 and I've set this up in qt. Everything compiles fine in qt, unfortunately when I run my app (from qt) it crashes. Any thougts? Edit (this is this application, OS Win7, Qt 4.8): #include…
smallB
  • 16,662
  • 33
  • 107
  • 151
0
votes
1 answer

Strange errors in intel's tbb

I've build intel's tbb, and in my qt pro file I've included following line: INCLUDEPATH += "C:\\Downloads\\libraries\\tbb40_297oss\\include" but when I try to compile my project I'm getting an error: …
smallB
  • 16,662
  • 33
  • 107
  • 151
0
votes
2 answers

C++ derived class exception not caught with base class

Exceptions are not being caught in a case where I expect them to be caught. The code is in 1 function in 1 cpp file which is compiled into a static library by GCC 4.2 and then linked into a Cocoa application. The code in question is class…
Barrie
  • 11
  • 4
0
votes
2 answers

cloog and ppl error (graphite-ppl.c) in GCC 4.6.2 installation

I'm trying to install gcc 4.6.2 with ppl and cloog in 64 bit ubuntu 10.10. I get the following error when I do make. make[3]: Entering directory…
psteelk
  • 1,305
  • 3
  • 16
  • 24
0
votes
1 answer

Unable to build openssl in Xcode 4.2.1

I could build openssl in xcode 3.5.2, but recently I upgraded to Xcode 4.2.1. Now when I try to build in the same old Xcode, I'm getting errors. Make[1]: /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2: No such file or directory…
chetan
  • 633
  • 1
  • 10
  • 26