Questions tagged [gcc4.6]

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

Version 4.6.0 was released on 2011-03-25. Version 4.6.4 was released on 2013-04-12.

See also:

17 questions
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
8
votes
2 answers

C++ reliance on argument to const reference not changing

Please consider the following code: void func1(const int &i); void func2(int i); void f() { int a=12; func1(a); func2(a); } Compiled with g++ 4.6 with -O3, I can see that the compiled re-reads the value of "a" between the function calls.…
Shachar Shemesh
  • 8,193
  • 6
  • 25
  • 57
6
votes
5 answers

What is this GCC error on Linux, and how do I solve it? gcc: internal compiler error: Illegal instruction (program as)

I type gcc hello.c and this appears: gcc: internal compiler error: Illegal instruction (program as) Please submit a full bug report, with preprocessed source if appropriate. See for instructions. hello.c…
GKFX
  • 1,386
  • 1
  • 11
  • 30
5
votes
3 answers

compiler error expected nested-name specifier

I am the OP for the question: Extending a class in which I received an excellent answer. However, as I try to compile the code (reworked slightly for my project) I received the following message (line no. changed to reflect following sample…
Jase
  • 519
  • 1
  • 9
  • 23
5
votes
0 answers

Travis-CI fails on symbol lookup error, works fine elsewhere

I have a library (technically a Ruby extension) called NMatrix which is written in C and C++. It uses C++ templates to manage different types, e.g., Rational128 versus Rational64. It also has RubyObject and Complex64 and Complex128. I force these…
Translunar
  • 3,739
  • 33
  • 55
4
votes
2 answers

C++11 initialization syntax issue (with gcc 4.5 / 4.6)

What is wrong with the following C++11 code: struct S { int a; float b; }; struct T { T(S s) {} }; int main() { T t(S{1, 0.1}); // ERROR HERE } gcc gives an error at the indicated line (I tried both gcc 4.5 and an experimental…
HighCommander4
  • 50,428
  • 24
  • 122
  • 194
4
votes
2 answers

(C99)Expand a macro in a different macro

I have a function in my program that takes 3 arguments. Some times in the code there is a macro defining 2 of these parameters. So this: void func(int x, int y, int z){...} Can be invoked like this: #define PAR 10,20 int z = 3; func(PAR, z); Now,…
Rato Zumbi
  • 63
  • 1
  • 7
3
votes
4 answers

Specialize function if argument has member variable

I have a function for error reporting that is templated because it can report errors for many different message classes: template void reportErr(const MSG& msg) { std::cout << "ERROR: " << msg.error << std::endl; } However, some…
Alec
  • 583
  • 3
  • 21
3
votes
1 answer

error: 'mutex' in namespace 'std' does not name a type in gcc 4.6.2

Simple program like this #include // std::cout #include // std::thread #include // std::mutex std::mutex mtx; // mutex for critical section int main () { return 0; } Tried the…
rkb
  • 10,933
  • 22
  • 76
  • 103
3
votes
0 answers

GCC 4.6.3 vs 4.7.3: Difference in printing greg_t for x86_64

I am attempting to fix a build error. The offending line of code is as follows: fprintf(crashLog, "RIP: %lX\n", context->uc_mcontext.gregs[REG_RIP]); And hence: gregs is of type gregset_t gregs[i] is of type greg_t Now this code (which is for…
Damien
  • 785
  • 3
  • 8
  • 18
2
votes
3 answers

compare void* with uint16_t

In some legacy code, which compiles fine on GCC 4.6 (with -fpermissive), I have this: uint16_t a = 0; void* b = ...; if(b == a) // ... Is this comparison well-defined on GCC 4.6? Does it downcast to 16 bits or upcast to 32/64 bits?
Albert
  • 65,406
  • 61
  • 242
  • 386
1
vote
1 answer

How build the LLVM dragonegg on macos10.14?

I read the book "Getting Started with LLVM Core Libraries", follow the book, I want to build a dragonegg-3.3 on my mac, so I download the dragonegg-3.3 source code form 'http://llvm.org/releases/3.3/dragonegg-3.3.src.tar.gz', and then I build the…
Princekin
  • 696
  • 9
  • 18
1
vote
2 answers

Custom print function with _TIME_, _FILE_, _FUNCTION_, _LINE_

I have following code in debug.h: #ifndef __DEBUG_H__ #define __DEBUG_H__ #ifdef DEBUG int al_debug(const char *format, const char * time, const char * file, const char * function, int line, ...); #define…
Khamidulla
  • 2,927
  • 6
  • 35
  • 59
1
vote
2 answers

gcc 4.6 on mac, how do I get it to work?

I am having problems getting gcc 4.6 to run on Mac 10.8.5. My experience with such matters is very limited and I have been searching around and trying different things to get this to work, but to no avail. I am sorry if the answer to this problem…
user2096176
  • 43
  • 1
  • 5
0
votes
1 answer

Unable to locate package gcc-4.6-base:i386

I'm having trouble with running a script to install prerequisite packages, which requires gcc-4.6-base:i386, and don't know how to install it with aptitude or something similar. For reference, I'm currently running Ubuntu 5.4.0-6ubuntu1~16.04.2.…
Atticus
  • 418
  • 2
  • 6
  • 20
1
2