Version 5.x of GCC (GNU Compiler Collection).
Questions tagged [gcc5]
76 questions
6
votes
2 answers
Raspberry Pi -fatal error: sys/cdefs.h: No such file or directory
I'm trying to compile gcc5.3.0 on my Raspberry Pi with latest Raspbian system image.
$ ./configure --enbale-checking=release --enable-languages=c,c++,fortran --host=arm-cortexa7_neon-linux-gnueabihf --build=arm-cortexa7_neon-linux-gnueabihf…

0xBBC
- 105
- 2
- 8
5
votes
1 answer
Why does it help to assign a const& scalar value to a const before a loop?
In GCC 5.4.0's stl_algobase.h we have:
template
inline typename
__gnu_cxx::__enable_if::__value, void>::__type
__fill_a(_ForwardIterator __first, _ForwardIterator __last,
…

einpoklum
- 118,144
- 57
- 340
- 684
4
votes
1 answer
Searching for recent GCC GIMPLE grammar
For my finale year project I'm learning about compiler techniques, and currently I'm trying to experiment with the GCC intermediate representation (raw GIMPLE) and getting the control flow graphs from different source files (C, Cpp and Java) using…

user7724084
- 41
- 2
4
votes
1 answer
AVX512 intrinsics header produces many errors after distro upgrades GCC to 5.5.0
My Linux distribution upgraded my GCC version to 5.5.0 (damned if I know why). Now, when I try to build code which includes avx512fintrin.h, I get a slew of compiler errors:
/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512fintrin.h(9220): error:…

einpoklum
- 118,144
- 57
- 340
- 684
4
votes
1 answer
Purpose of --enable-gold when configuring gcc
When building gcc 5.1 from source, the configure script lists the following option:
--enable-gold[=ARG] build gold [ARG={default,yes,no}]
What does this mean? Is it telling gcc to use gold as the linker if gold is installed on the box ? If so,…

MK.
- 3,907
- 5
- 34
- 46
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
3
votes
1 answer
CXX11 undefined references with GCC 6.2.0
We have manually installed GCC 6.2.0 on a Scientific Linux machine. The compilation of a C++ application seems fine but we get lots of undefined references to CXX11 at linking time
file.cpp:(.text+0x16cb): undefined reference to…

Manolete
- 3,431
- 7
- 54
- 92
3
votes
1 answer
Cannot decode an obscured compiler error in g++ when user custom hash function in unordered_map
Here is the code I am trying to compile:
#include
#include
#include
#include
#include
#include
#include
using namespace std;
namespace _LEET_MAX_POINTS_ON_A_LINE
{
…

Andrew Au
- 812
- 7
- 18
3
votes
0 answers
error: 'log1p' is not a member of 'std'
I create a simple main function and above it, I include armadillo library.
#include
I compiled it using g++ (version of GCC is 5.3) and under cygwin 64bit on windowse 8. I turned on c++11 option and added -larmadillo for linking to…

saliva
- 31
- 1
2
votes
0 answers
Misunderstanding of C switch statement or gcc bug?
The following code seems to be correctly executed when compiled with
GCC 4.4.7 and LLVM 6.1. Yet i don't think it correctly compiles with gcc version
5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.4).
The following is what I have reduced the problem…

Luke
- 884
- 8
- 21
2
votes
1 answer
gtkmm undefined reference to certain gtk::builder function add_from_file
I am using eclipse, mingw-w64, gtkmm2.4, glade to compile some simple program.
I can compile hello world gtkmm examples, following a tutorial to, however when it comes to glade came a little strange undefined to error.
program that compiled and run…

Jimmy Chi Kin Chau
- 153
- 1
- 13
2
votes
1 answer
gcc - openacc - Compiled program does not function properly
Recently, there have been some efforts in GCC community to support OpenACC in their compiler. So, I wanted to try it out.
Using this step-by-step tutorial (tutorial), which was close to the main documentation on GCC website, I was able to compile…

mgNobody
- 738
- 7
- 23
2
votes
3 answers
Trying to get CUDA 7.5 to work with GCC 5.x
So, if you try to use nvcc when the system GCC is version 5 and up, you get an "unsupported version" error. But - I've heard people report that they've just commented this out and that CUDA 7.5 "works for them" with GCC 5.x .
When I do the same,…

einpoklum
- 118,144
- 57
- 340
- 684
2
votes
1 answer
Which IDE in order to install and use a compiler with C++14 constexpr relaxation?
I apologize if this question is out of topic, but it's a matter of accessibility for C++14 programmers.
Today i've updated Qt v5.4 on my PC (Windows 8.1/64bit/x86) and it support now the gcc compiler v4.9.2. But i've seen that constexpr relaxation…

Cevik
- 313
- 1
- 4
- 17
2
votes
0 answers
Cxx11 ABI for a single function call?
Is it possible to define a piece of your code to be compiled with Cxx11 but the rest is using the compatibility ABI of libstdc++6 ?
Example:
// Compatibility ABI
int myvar = 0;
std::string mystring = "hello";
// This method is from another…

EinarMar
- 45
- 5