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

Why am I able to link without including ctype.h

Without #include, the following program outputs 1 and 0. With the include, it outputs 1 and 1. I am using TDM-GCC 4.9.2 64-bit. I wonder what the implementation of isdigit is in the first case, and why it is able to…
user1537366
  • 1,100
  • 1
  • 9
  • 15
10
votes
1 answer

gcc 4.9 bug in structures initialization?

I have the code: struct A { int a; }; struct B { int b; const A a[2]; }; struct C { int c; const B b[2]; }; const C test = {0, {}}; int main() { return test.c; } I have gcc 4.8.2 and 4.9.2. It can be compiled just fine…
Nikita Karpinsky
  • 503
  • 4
  • 10
10
votes
1 answer

installing GCC-4.9 without root - adding paths and binaries and extra

i just installed gcc 4.9 using the link here and it is a very good link. But I have only one problem which i dont want to try not to mess up --> linking the libraries and path variables. we have a cluster in our college and i installed this in my…
pugs
  • 155
  • 1
  • 8
8
votes
4 answers

Clang++ --gcc-toolchain and gcc 4.9.3 linking issues

(Ubuntu 16.04.1) By default on 16.04.1 clang is picking the gcc tool chain for 5.4. Unfortunately I have a library that requires pre-5.0 ABI and I do NOT have access to the source, nor has the implementer released a new version. I've been trying to…
ErnieE
  • 143
  • 1
  • 6
8
votes
3 answers

R 3.2, GCC, and homebrew

I recently needed to install R 3.2 to get a package from Bioconductor working, but after I installed, I get the following error: [16:16:11 20] $ r dyld: Library not loaded: /usr/local/lib/gcc/4.9/libgfortran.3.dylib Referenced from:…
muppetjones
  • 296
  • 3
  • 14
7
votes
1 answer

Capture this in lambda attribute inside a templated class vs not-templated class

I have succeeded writing a class like this one, capturing this in a lambda defined as non-static attribute of said class: #include #include #include struct S { S() { std::cout << "S::S()[" << this << "]" <<…
pyro
  • 73
  • 5
7
votes
1 answer

g++4.9 bug in allowing std::vector

Consider the following code: #include #include #include using namespace std; typedef double (C_array)[10]; int main() { std::vector arr(10); // let's initialize it for (int i = 0; i < 10; i++) …
vsoftco
  • 55,410
  • 12
  • 139
  • 252
7
votes
1 answer

How do I compile and run GCC 4.9.x?

I'm running debian wheezy and wanted to upgrade from GCC 4.7.2 to GCC 4.9.0. As per these instructions I installed libgmp-dev, libmpfr-dev and libmpc-dev (my package manager gave me versions 2:5.0.5+dfsg-2, 3.1.0-5 and 0.9-4 respectively) and ran…
quant
  • 21,507
  • 32
  • 115
  • 211
6
votes
1 answer

Determine cause of segfault when using -O3?

I'm having trouble determining the cause of a segfault when a program is compiled with -O3 with GCC 4.8/4.9/5.1. For GCC 4.9.x, I've seen it on Cygwin, Debian 8 (x64) and Fedora 21 (x64). Others have experienced it on GCC 4.8 and 5.1. The program is…
jww
  • 97,681
  • 90
  • 411
  • 885
6
votes
1 answer

Why gcc-4.9.2 can't support std::string.insert(iterator, range) to return iterator

According to cppreference, C++11 should support: template< class InputIt > iterator insert( const_iterator pos, InputIt first, InputIt last ); But when I try to compile following code using g++ 4.9.2: std::string str{ "hello world" }, addition{ "h…
pezy
  • 1,022
  • 2
  • 8
  • 27
6
votes
1 answer

std::rotate return value in gcc 4.9

Is it bug, that std::rotate function have void return value type in GCC 4.9 even if I specify -std=gnu++1y flag? As it pointed here there should be meaningfull (for some applications) return value.
Tomilov Anatoliy
  • 15,657
  • 10
  • 64
  • 169
6
votes
1 answer

why for loop has 1 extra instruction than expected?

I write a lot of vectorized loops, so 1 common idiom is volatile int dummy[1<<10]; for (int64_t i = 0; i + 16 <= argc; i+= 16) // process all elements with whole vector { int x = dummy[i]; } // handle remainder (hopefully with SIMD too) But…
Yale Zhang
  • 1,447
  • 12
  • 30
6
votes
2 answers

Installing gcc49 with Homebrew

I'm trying to get Homebrew to install gcc49 (GCC 4.9). Specifically, I'm installing using the command, brew install homebrew/versions/gcc49 However, doing this normally, I get an error saying that I'm missing gmp4. This is where it gets weird. If I…
Jules
  • 14,200
  • 13
  • 56
  • 101
5
votes
0 answers

GCC compiler flags different between native and haswell

I am on a linux haswell box but when doing gcc -march=native -Q --help=target it has different compiler switches than doing gcc -march=haswell -Q --help=target I typed the following to see the differences side by side diff -u <(gcc -march=native…
bjackfly
  • 3,236
  • 2
  • 25
  • 38
5
votes
1 answer

Comparing 8 bits types of different signedness (int8_t, uint8_t): is result deterministic?

I run this simple program: #include #include int main() { uint8_t x = 100; int8_t y = -128; if (x < y) { std::cout << (int) x << " is less than " << (int) y << std::endl; } else { std::cout <<…
Antonio
  • 19,451
  • 13
  • 99
  • 197