Questions tagged [gcc4.4]

Version 4.4 of GCC (GNU Compiler Collection). GCC is the de facto standard C compiler on Linux (but version 4.4 is not used on modern versions of Linux). The compiler collection supports many other languages and platforms as well.

Version 4.4.0 was released on 2009-04-2. Version 4.4.7 was released on 2012-03-13.

See also:

29 questions
45
votes
5 answers

Expressions "j = ++(i | i); and j = ++(i & i); should be a lvalue error?

I was expecting that in my following code: #include int main(){ int i = 10; int j = 10; j = ++(i | i); printf("%d %d\n", j, i); j = ++(i & i); printf("%d %d\n", j, i); return 1; } expressions j = ++(i |…
Grijesh Chauhan
  • 57,103
  • 20
  • 141
  • 208
17
votes
6 answers

GCC 4.4: Avoid range check on switch/case statement in gcc?

This is only an issue on GCC versions prior to 4.4, this was fixed in GCC 4.5. Is it possible to tell the compiler the variable used in a switch fits within the provided case statements? In particular if it's a small range and there's a jump table…
alecco
  • 2,914
  • 1
  • 28
  • 37
9
votes
2 answers

Ignoring note: offset of packed bit-field without using "-Wno-packed-bitfield-compat"

I have this warning pop up when I'm trying to compile the following union: 10:5: note: offset of packed bit-field 'main()::pack_it_in::::two' has changed in GCC 4.4 #pragma GCC diagnostic ignore "-Wpacked-bitfield-compat" union…
Oleg K
  • 93
  • 1
  • 6
6
votes
4 answers

How are the ntoh functions implemented under RHEL/GCC?

A production issue has led our team to the following questions: Under RHEL6 using GCC 4.4.6, how are ntohs and ntohl implemented? Are the implementations known to be fast or slow? How can I actually see the generated assembly code for the…
John Dibling
  • 99,718
  • 31
  • 186
  • 324
5
votes
3 answers

Why do I get a multiple definition error while linking?

I use these two files here and here. I created a class in two separate files: modul1.h #ifndef MODUL1_H #define MODUL1_H #include #include #include "easylogger.h" class Modul1 { public: Modul1(std::string name); …
Burkhard
  • 14,596
  • 22
  • 87
  • 108
5
votes
3 answers

error occurred compiling gcc from source code

Right now the gcc and g++ on my ubuntu 15.10 machine is version 5.2.1. I need to install v4.4 of them for some reason. I downloaded the source code of gcc4.4.7 and configure with this: ../configure \ --disable-checking \ …
darklord
  • 5,077
  • 12
  • 40
  • 65
3
votes
4 answers

Random integers with g++ 4.4.5

I'd like to generate random integers in some interval. I don't want to use the basic implementation of srand with time(NULL) as the seed since I have read that it is not the most "random" way of doing this. I have seen lots of posts describing how…
t354
  • 567
  • 4
  • 12
2
votes
1 answer

can I use auto with g++ 4.4?

I can specify -std=c++0x for compilation with my g++ 4.4, and initializer lists are correct, I may use them (in c++98 I can't) but still get errors when try use auto keyword: std::list< std::vector > li2; li2.push_back({1, 2, 3}); //push_back…
user2316968
1
vote
1 answer

C++98 template class static member initialization?

In a large C++ code base, originally written @ 2001, a Singleton class is used heavily, and is defined like: template struct Singleton { T *Instance() { return _instance; } ... static T *_instance; }; #define…
JVD
  • 645
  • 1
  • 7
  • 17
1
vote
1 answer

Feeding boost::format with variadic parameters

I am attempting to write a logging function which takes a variadic argument list and prints in a safe manor. vprintf seems like the obvious answer, but I cannot seem to find a safe way to handle when the format string expects more arguments than…
1
vote
1 answer

Error in source code, after down grade cross compiler from gcc4.9.2 to gcc4.4.1

I am currently working on arm-unknown-linux-gnueabi and downgraded compiler from gcc4.9.2 to gcc4.4.1. I used crosstool-ng to compile compiler with gcc4.4.1.As you know gcc4.9.2 supports more c++11 features then gcc4.4.1. Code was compiling with no…
1
vote
2 answers

How to implement large vector initialization that compiles with gcc-4.4?

I have a list of 20k known strings that I know at compile time and will never change. A sort of non-configurable dictionary. I do not want to load it in run time from a file, because this would imply a lot of unnecessary architecture: finding the…
1
vote
2 answers

Is there any way to insert a unique_ptr into a map in C++0x/gcc 4.4.7)?

I can't figure out how to do it; it's driving me nuts. #include #include #include int main() { std::map> map; std::unique_ptr bar(new std::string("bar")); …
Thomas
  • 392
  • 5
  • 14
1
vote
1 answer

Want A New version of GCC with As,LD and AR

I am trying to install a new compiler on a machine, locally. I dont have sudo access. When I create the compiler I dont have LD, AS or AR, which I need because I am trying to compile a local version of lib c. So I get this version of GCC wget…
user411287
  • 23
  • 5
0
votes
1 answer

Enabling long long in C89 at GCC 3.2, 4.4 and 5.4

I'm working in C89 in quite a restricted environment. I am required to write for a compiler based on GCC 4.4, but my code must also pass tests compiled with GCC 3.2. Our everyday development compiler is GCC 5.4. For my money, this is as mad as it…
Walkingbeard
  • 590
  • 5
  • 15
1
2