Questions tagged [gcc4.9]

Version 4.9 of GCC (GNU Compiler Collection). GCC 4.9.0 is a major release containing substantial new functionality not available in GCC 4.8.x or previous GCC releases.

GCC 4.9.0 is a major release containing substantial new functionality not available in GCC 4.8.x or previous GCC releases. Version 4.9.0 was released on 2014-04-22. Version 4.9.4 was released on 2016-08-03.

The Local Register Allocator, introduced in GCC 4.8.0 for ia32 and x86-64 targets only, is now used also on the Aarch64, ARM, S/390 and ARC targets by default and on PowerPC and RX targets optionally.

There have been substantial improvements to C++ devirtualization and various scalability bottlenecks in the interprocedural optimizations and LTO have been fixed.

Support for various C++14 additions have been added to the C++ Front End, on the standard C++ library side the most important addition is support for the C++11 <regex>.

GCC 4.9.0 supports the OpenMP 4.0 standard for C and C++, and a partial implementation of the Cilk Plus extension for data and task parallelism.

Various kinds of undefined behaviors in programs can be now diagnosed at runtime through Undefined Behavior Sanitizer.

Support for the new little-endian powerpc64le-linux platform has been added, which defaults to the new PowerPC ELFV2 ABI. On x86-64 and ia32, support for the AVX-512 instruction set has been implemented.

See also:

118 questions
5
votes
1 answer

Linker map file sometimes has mangled symbols but not always

As part of our build process we generate a map file when we compile our executable. For example: g++ -Wl,-Map,/tmp/foo.map -o foo foo.cpp In an attempt to migrate from GCC 4.3/4.4 to GCC 4.9 we have setup a new build server. The map file…
Pace
  • 41,875
  • 13
  • 113
  • 156
5
votes
1 answer

GCC 4.9.1 ThreadSanitizer "As if synchronized via sleep"

I'm working on cleaning up ThreadSanitizer warnings in a largeish project. In particular in this exact case, there is a spawned thread which reads from a file, producer. Then there are one or more decompression threads as part of a thread pool.…
inetknght
  • 4,300
  • 1
  • 26
  • 52
5
votes
1 answer

Is set_value_at_thread_exit() supported on gcc?

This is my first post here so please be lenient :) I am having a problem with set_value_at_thread_exit() method from promise class (part of c++11). Everything was ok in VS2013 but GCC gives me following error message: error: ‘class…
user3731418
5
votes
2 answers

GCC 4.9's unordered_set and std::move

When moving an unordered_set out on GCC 4.9, and then reusing the moved-from object, I am getting a divide-by-zero when I add to it. My understanding (from http://en.cppreference.com/w/cpp/utility/move) is that the moved-from object can be used…
Matt Godbolt
  • 1,381
  • 11
  • 14
4
votes
3 answers

Workaround for returning uncopyable object without a move ctor

In my API I have a function that returns std::istringstream. The std::istringstream class is non-copyable but supports moving so on a conforming compiler there is no problem returning a local std::istringstream. However, on gcc 4.9, there is no…
Adi Shavit
  • 16,743
  • 5
  • 67
  • 137
4
votes
4 answers

Compiler optimization breaks lazy iterator

I wrote a custom container with its custom iterator. Due to the specific features of the container the iterator must be evaluated lazily. For the sake of the question the relevant part of the code is the dereferencing operator of the iterator which…
Triskeldeian
  • 590
  • 3
  • 18
4
votes
2 answers

brew install gcc49 on OS X 10.10 (Unable to find a usable ISL)

When I try to install gcc49, I receive an error $ brew install https://raw.githubusercontent.com/Homebrew/homebrew-versions/master/gcc49.rb ######################################################################## 100.0% ==> Downloading…
4
votes
5 answers

Exception thrown by 'stol' using Visual Studio but not gcc

The following code throws an exception when it is run under Visual Studio 2013 but not gcc 4.9.2. The error reported is: 'exception: stol argument out of range' stol returns a long so the size of temp should be big enough to hold the returned…
ksl
  • 4,519
  • 11
  • 65
  • 106
4
votes
3 answers

g++4.9 and g++5 different behaviour when narrowing in initializing list

Consider this code: #include int main() { int i{10.1}; // narrowing, should not compile std::cout << i << std::endl; } According to the C++11 standard, it should not compile (narrowing in brace initialization is forbidden.) Now,…
vsoftco
  • 55,410
  • 12
  • 139
  • 252
4
votes
0 answers

Debugger settings: codeblock osx

I have CodeBlocks 13.12 (CodeBlocks-13.12-mac) installed on OSX 10.9.2 (Mavericks). I am using gcc 4.9 and have gdb (7.7.1) installed. I am able to successfully build and run simple programs. But when I try to "debug" (e.g., "run to cursor"), I get…
3
votes
2 answers

./libmylib.so: undefined reference to `submarinex::LIB::kCount'

I have 3 files in a directory. I will build ll.cc to libmylib.so, and build main.cc to myexe. Use these command to build g++ -Wall -g -fPIC -std=c++11 ll.cc -shared -o libmylib.so g++ -Wall -g -std=c++11 main.cc -L. -lmylib -o myexe But, g++ report…
SubmarineX
  • 850
  • 5
  • 19
  • 38
3
votes
1 answer

GCC Error: extended registers have no high halves

I am trying to compile a 64bit C library using gcc-4.9.1. While compiling with -O2, I am getting the following error at different places. -O0 compilation works fine. Error: error: extended registers have no high halves Any idea why this error…
MGH
  • 475
  • 7
  • 19
3
votes
1 answer

gcc 4.9.1 not standard compliant? (std::runtime_error)

We would like to have a own definition of std::runtime_error:runtime_error(const string& arg). We implement such constructor in terms of the other constructor, i.e., std::runtime_error:runtime_error(const char*), like: namespace std { …
Harald
  • 240
  • 2
  • 10
3
votes
0 answers

gcc 4.9.3: more aggressive NULL pointer check removal

I have the following code excerpt (extract from a big project), when compiled using gcc 4.9.3 with -O2 or -O3, it crashes when it tries to dereference s inside the if block (s->someField) because s is a NULL pointer. By disassembling this code in…
bohanl
  • 1,885
  • 4
  • 17
  • 33
3
votes
2 answers

How to make GNU GCC optimize OpenMP threads similarly

This is my first post here. Yay! Back to the problem: I'm learning how to use OpenMP. My IDE is Code::Blocks. I want to improve some of my older programs. I need to be sure that the results will be exactly the same. It appears that "for" loops are…
Stratubas
  • 2,939
  • 1
  • 13
  • 18