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
56
votes
1 answer

version `CXXABI_1.3.8' not found (required by ...)

When I run my program following a compile, I get the following error: ./prog: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version CXXABI_1.3.8' not found (required by ./prog) ./prog: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: versionGLIBCXX_3.4.19'…
quant
  • 21,507
  • 32
  • 115
  • 211
45
votes
2 answers

What features does gcc-4.9 Undefined Behavior Sanitizer have?

In gcc-4.9 changes it says: UndefinedBehaviorSanitizer (ubsan), a fast undefined behavior detector, has been added and can be enabled via -fsanitize=undefined. Various computations will be instrumented to detect undefined behavior at runtime.…
user1508519
41
votes
2 answers

Difference between std::regex_match & std::regex_search?

Below program has been written to fetch the "Day" information using the C++11 std::regex_match & std::regex_search. However, using the first method returns false and second method returns true(expected). I read the documentation and already existing…
Mantosh Kumar
  • 5,659
  • 3
  • 24
  • 48
32
votes
2 answers

Is memcpy(&a + 1, &b + 1, 0) defined in C11?

This question follows this previous question about the definedness of memcpy(0, 0, 0), which has been conclusively determined to be undefined behavior. As the linked question shows, the answer hinges on the contents of C11's clause 7.1.4:1 Each of…
Pascal Cuoq
  • 79,187
  • 7
  • 161
  • 281
27
votes
2 answers

Can you mix c++ compiled with different versions of the same compiler

For example could I mix a set of libraries that have been compiled in say GCC-4.6 with GCC-4.9. I'm aware different compilers "breeds" such as VS cannot be with MinGW but can different generations of the same compiler? Are issues likely to occur? If…
robby987
  • 827
  • 1
  • 9
  • 25
23
votes
2 answers

Is auto as a parameter in a regular function a GCC 4.9 extension?

gcc 4.9 allows the following code, but gcc 4.8 and clang 3.5.0 reject it. void foo(auto c) { std::cout << c.c_str(); } I get warning: ISO C++ forbids use of 'auto' in parameter declaration [-Wpedantic] in 4.9 but in 4.8 and clang I get error:…
user4048234
  • 253
  • 2
  • 6
19
votes
3 answers

"Assume" clause in gcc

Does gcc (latest versions: 4.8, 4.9) have an "assume" clause similar to __assume() built-in supported by icc? E.g., __assume( n % 8 == 0 );
user2052436
  • 4,321
  • 1
  • 25
  • 46
15
votes
1 answer

Unpacking parameter packs in template aliases

I run into a problem with unpacking variadic templates into a template alias. The following code works with Clang 3.4 and GCC 4.8 but fails with GCC 4.9: template using front_type = T; template struct…
mavam
  • 12,242
  • 10
  • 53
  • 87
15
votes
1 answer

Why is gcc 4.9 (trunk) so slow?

I have built an up-to-date vanilla GCC from svn with these flags: ../configure \ --enable-languages=c,c++ \ --disable-nls \ --enable-multilib \ --prefix=/opt/other/gcc-svn \ --program-suffix=-svn \ …
Thomas
  • 3,074
  • 1
  • 25
  • 39
13
votes
1 answer

Difference between boost optional and std::experimental optional assignment

Usually when a function returns boost::optional I've seen a lot of people returning an empty brace {} to designate an empty value, that works fine and is shorter than returning boost::none. I tried to do something similar to empty a…
dlavila
  • 1,204
  • 11
  • 25
12
votes
2 answers

MinGW GCC 4.9.1 and floating-point determinism

I wrote a small program to compute the Euclidean norm of a 3-coordinate vector. Here it is: #include #include #include template auto norm(const std::array& arr) -> T { T res{}; …
Morwenn
  • 21,684
  • 12
  • 93
  • 152
12
votes
4 answers

How to install g++ 4.9 on Debian Wheezy armel?

My Debian 7 armel embedded system currently has g++ 4.6, and I'd like to upgrade to g++ 4.9 to use new C++11 features. How do I do that? My current sources.list contents is: deb http://security.debian.org/ wheezy/updates main deb-src…
user43995
  • 597
  • 2
  • 8
  • 21
11
votes
5 answers

What is happening here in pow function?

I have seen various answer here that depicts Strange behavior of pow function in C. But I Have something different to ask here. In the below code I have initialized int x = pow(10,2) and int y = pow(10,n) (int n = 2). In first case it when I print…
CuriosGuy
  • 181
  • 1
  • 9
11
votes
1 answer

Template conversion function to const-reference

The following works fine (as one would expect): struct X {}; struct A { operator X const& () { static const X value{}; return value; } }; int main() { A a; X x = a; } But this is not so clear: template struct X…
DaviD.
  • 465
  • 3
  • 9
11
votes
2 answers

How to install G++ 4.9 on windows

I know this seems like a duplicate of this question and many more, but hear me out. That question points to MingGW, which, as far as I can tell, only has version 4.8.whatever of gcc with it. I tried Cygwin, but Cygwin never really worked with my…
rootmeanclaire
  • 808
  • 3
  • 13
  • 37
1
2 3 4 5 6 7 8