Questions tagged [gcc4.8]

Version 4.8.x of the GNU Compiler Collection. The C compiler is the de facto for Linux (though not all versions of Linux use version 4.8.x),. The compiler collection supports many other languages and platforms as well.

GCC version 4.8.x is a major release of the GNU Compiler Collection. Version 4.8.0 was released on 2013-03-22. Version 4.8.5 was released on 2015-06-23.

See also:

122 questions
46
votes
4 answers

When will Gnu C++ support C++11 without explicitly asking for it?

Currently, with g++-4.8.1 you have to compile a file in C++11-mode via g++ -std=c++11 -o prog.x prog.cpp Is there a plan when I just can say g++ -o prog.x prog.cpp to compile prog.cpp? Maybe prog.cpp has #include thread_local class Widget…
towi
  • 21,587
  • 28
  • 106
  • 187
24
votes
3 answers

Is GCC loop unrolling flag really effective?

In C, I have a task where I must do multiplication, inversion, trasposition, addition etc. etc. with huge matrices allocated as 2-dimensional arrays, (arrays of arrays). I have found the gcc flag -funroll-all-loops. If I understand correctly, this…
AndreaF
  • 11,975
  • 27
  • 102
  • 168
21
votes
1 answer

C++11 private default constructor

The following C++11 code compiles successfully on my GCC 4.8: struct NonStack { private: NonStack() = default; public: static NonStack* Create(){ return new NonStack; } }; NonStack a; int main() { } However the following gives a…
thomas
  • 505
  • 3
  • 12
20
votes
7 answers

Unknown type name ‘off64_t’

I have a problem using Apache Portable Runtime on Ubuntu with GCC 4.8.1 The problem is that the off64_t from is not available when compiling with gcc. (When compiling with g++ everything work fine) Does anybody know which compiler…
Der Appit
  • 329
  • 1
  • 2
  • 4
16
votes
1 answer

Does gcc 4.8.1 enable sse by default?

I experienced crashes running an old code of mine on a system which doesn't support SSE4.1, I debugged a bit and found SSE instructions in the glibc, is that possible? Why isn't this reported in gcc 4.8.1 release notes?
Marco A.
  • 43,032
  • 26
  • 132
  • 246
14
votes
2 answers

Memory leak in gcc 4.8.1 when using thread_local?

Valgrind is reporting leaked blocks, apparently one per thread, in the following code: #include #include #include #include #include std::mutex cout_mutex; struct Foo { Foo() { …
Stephen Croll
  • 143
  • 1
  • 6
13
votes
2 answers

Is there a GCC warning that detects bit shift operations on signed types?

If I read the C++ ISO specification (sections 5.8.2 and 5.8.3) right, the right-shift of negative signed types is implementation specific and the left-shift undefined behaviour. Therefore I would like to find shift operations on signed types in our…
10
votes
2 answers

constexpr versus template, pow function

I am experimenting new feature of the c++11, constexpr especially. If I want to code a pow with template I will simply do: //pow template struct helper_pow{ inline static T pow(T const& a){ return…
Timocafé
  • 765
  • 6
  • 18
10
votes
5 answers

Getting a unique_ptr out of a priority queue

I am maintaining a set of unique_ptr instances in a priority_queue. At some point, I want to get the first element and remove it from the queue. However, this always produces a compiler error. See sample code below. int main () { …
Chris
  • 6,914
  • 5
  • 54
  • 80
9
votes
2 answers

Make exits with "Error 2" when trying to install gcc-4.8.1

I'm trying to install gcc-4.8.1 on an AWS ec2 "Other Linux" distribution. I downloaded gcc-4.6.2.tar.gz and then followed these instructions under the 'Configuration' heading from http://gcc.gnu.org/wiki/InstallingGCC (modified for 4.8.1 instead of…
MattG
  • 1,416
  • 2
  • 13
  • 31
8
votes
2 answers

When int isn't an int (intX_t)

I have some headache inducing problems here. Basically I'm trying to make a library compatible with different Arduino systems (not an Arduino question). I have a situation where types no longer match, as in an int is no longer equivalent to its…
Chris A
  • 1,475
  • 3
  • 18
  • 22
8
votes
1 answer

Strange results when using C++11 regexp with gcc 4.8.2 (but works with Boost regexp)

I tried to use C++11's regular expression but failed even in trivial examples. From the outside, it seems to only compare the strings, for example: std::regex_match(std::string{""}, std::regex{"a?"}) // false…
Philipp Claßen
  • 41,306
  • 31
  • 146
  • 239
8
votes
1 answer

How to update to mingw-gcc 4.8.2?

I want to use Regular expression in c++11 and gcc 4.8.2 supports it. But the MinGW installer only supports up to gcc 4.8.1. How can I update it to gcc 4.8.2?
tenos
  • 909
  • 1
  • 9
  • 16
8
votes
1 answer

__int128 error when compiling 32 bit

c:\...random.h|106|error: expected unqualified-id before '__int128' When I'm compiling a 32 bit program, the above is the error I get. I'm using http://sourceforge.net/projects/mingwbuilds/ Why? My code compiled fine with 4.7.2 but I wanted to…
Brandon
  • 22,723
  • 11
  • 93
  • 186
7
votes
2 answers

C++11 std::this_thread::sleep_until() hangs when compiled with GCC 4.8.5

Consider the following program: #include #include int main() { std::this_thread::sleep_until(std::chrono::steady_clock::now() - std::chrono::seconds(10)); return 0; } When compiled with GCC 4.8.5, it will hang. When…
R. Taukulis
  • 203
  • 1
  • 6
1
2 3
8 9