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
2
votes
2 answers

Can't define templated types for my LruCache class

#include #include template < typename K, typename V> class LruCache { private: typedef std::pair< K, V > EntryPair; typedef std::list< EntryPair > CacheList; typedef std::map< K, CacheList::iterator > CacheMap; public: …
hookenz
  • 36,432
  • 45
  • 177
  • 286
2
votes
1 answer

how to hide local symbol for linux static library

I'm going to ship a to static library to a customer. To maximize the privacy of the library I have restricted symbols for the static library using the technique provided by @ypsu Symbol hiding in static libraries built with Xcode However, the above…
prgbenz
  • 1,129
  • 4
  • 13
  • 27
2
votes
0 answers

GCC 4.5, boost and throw_error_already_set

Using Python 2.2.3, Boost 1.46 and this trivial extension module: #include #include using namespace boost::python ; using namespace boost; class PyTest { public: PyTest(); }; PyTest::PyTest() { …
fraca7
  • 1,178
  • 5
  • 11
2
votes
0 answers

Clarification required on gcc option -mcmodel=medium

While compiling one of our dependent tool, a long list relocation error is showing up while linking: SomeLibrary.a(SomeObject.o)(.text._bla_bla_bla): error: relocation overflow collect2: error: ld returned 1 exit status cook: command g++: exit…
Foobar-naut
  • 111
  • 3
  • 11
2
votes
1 answer

Puzzling introduction of temporary in `* const&` on older C++ compilers

When building on a platform with an older C++ compiler, I noticed unexpected behavior with code that worked fine elsewhere. I'm not sure whether this indicates a bug in older compilers, or some change in the standard, but I have been explicitly…
Neil Steiner
  • 729
  • 1
  • 7
  • 17
2
votes
0 answers

GCC -O2 with -march / -ftree-vectorize

I am trying out several compiler switches against a program that performs sobel kernel convolution on two images( 2000Hx3000W and 6800Hx8500W ). There are some observations that I am not able to interprete, following are the data - compiler flags…
Sayan
  • 2,662
  • 10
  • 41
  • 56
2
votes
3 answers

g++, doubles, optimization and a big WTF

bug in my gcc? bug in my code? both? http://files.minthos.com/code/speedtest_doubles_wtf.cpp Somehow, it manages to "optimize" a function that results in the array of doubles being zeroed out into taking 2.6 seconds on my q6600, instead of the 33 ms…
Minthos
  • 900
  • 4
  • 13
2
votes
1 answer

How to build a cross compile NetBSD toolchain using NetBSD

I have a NetBSD VM that I created using qemu, and I am trying to compile a simple Hello World.c program with the cross compiled toolchain that I built using the build.sh script that comes with the NetBSD source. However, I can not get the program…
ipatch
  • 3,933
  • 8
  • 60
  • 99
2
votes
1 answer

How to use gcc 4.5?

http://gcc.gnu.org/install/binaries.html This page has the binaries. Which one would work for Fedora?
Moeb
  • 10,527
  • 31
  • 84
  • 110
2
votes
1 answer

install gcc 4.9 under suse10, "checking whether to enable maintainer-specific portions of Makefiles... no"

I install gcc 4.9 by the following step wget ftp://mirrors.kernel.org/gnu/gcc/gcc-4.9.0/gcc-4.9.0.tar.gz tar -zxvf gcc-4.9.0.tar.gz cd gcc-4.9.0 ./contrib/download_prerequisites cd .. mkdir gcc-build-4.9.0 cd gcc-build-4.9.0 ../gcc-4.9.0/configure…
Sleepwom
  • 227
  • 6
  • 15
2
votes
2 answers

Why gcc4 warn and how to avoid it

I have a function declared as: void event_add_card (EventAddr addr, EventType type, unsigned char card); and union typedef union EventData { float money; /**< money info */ unsigned char card; /**< new card…
vitaly.v.ch
  • 2,485
  • 4
  • 26
  • 36
2
votes
1 answer

lpm rd,Z always translates to lpm rd,Z+ on inline assembly in gcc-avr

This is a follow up question to this. I'm writing code for an __AVR_HAVE_LPMX__ processor (avr25) using GNU C (WinAVR 20100110) version 4.3.3 (avr) / compiled by GNU C version 3.4.5 (mingw-vista special r3), GMP version 4.2.3, MPFR version…
Thomas
  • 595
  • 6
  • 15
2
votes
1 answer

Cannot install python pillow due to gcc-4.2

I have tried so many things to get this going. I have been through as many of the numerous threads on problems with gcc-4.2 but it's still not working. Does anyone have any sage advice to nip this one in the bud? I'm on Snow Leopard OSX…
KindOfGuy
  • 3,081
  • 5
  • 31
  • 47
2
votes
1 answer

Switching the default Xcode compiler to "apple-gcc42"? (especially for perl Javascript::V8)

Starting points: using Macports for all packages on OS x but perl (e.g. have installed the v8 Macports package) for perl - using perlbrew Javascript::V8 has a known bug - it didn't compiles with the newest Xcode compiler the bugreport mentioning…
clt60
  • 62,119
  • 17
  • 107
  • 194
2
votes
1 answer

Boost Serialization of a Tree?

I have a tree class that I need to serialize. The code: #include #include #include #include #include…
Richard Żak
  • 814
  • 1
  • 11
  • 21