Questions tagged [gcc4]

Version 4.x of GCC (GNU Compiler Collection). It's the de facto standard C compiler on Linux and supports many other languages and platforms as well.

Version 4.0.0 was released on 2005-04-20. Version 4.9.4 was released on 2016-08-03.

See also:

184 questions
2
votes
3 answers

Pointer to array shared between multiple source files

This is my file1 called main.c #include #include #define MONTHS 12 void ChangeDay(void); int* days; int main(void) { days = (int*) malloc(MONTHS * sizeof(int)); if(days != NULL) ChangeDay(); else …
boleto
  • 1,149
  • 1
  • 22
  • 32
2
votes
2 answers

template backward compatibility with gcc 4.7

Take the following code snippet: struct whatever {}; template < template class FOX, typename bat> struct wulf {}; template struct box; template struct…
Palace Chan
  • 8,845
  • 11
  • 41
  • 93
2
votes
4 answers

GCC 4.6.3 fail to install Debian

I'm having trouble installing gcc 4.6.3 on Debian squeeze. 4.4 is currently installed but I need 4.6.x to run php-hiphop. I've tried looking for similar problems but haven't found any with the error I have. I install using these instructions: wget…
boundless08
  • 303
  • 4
  • 17
2
votes
2 answers

Bizarre template error message with gcc 4.6

I'm getting a truly bizarre error message from gcc 4.6 about a template member function. Here is a minimal example: template class Pimpl { public: Pimpl(const Pimpl&) {} private: T* clone_(const T*); }; template
Michi Henning
  • 198
  • 1
  • 7
2
votes
0 answers

"ld: unknown/unsupported architecture name for: -arch i686" error when installing gcc-4.0.1 on a mac with Darwin 12.1.0

I am trying to install gcc-4.0.1 on a mac with Darwin 12.1.0 . I did the configuration with ./configure --prefix=/usr/local/gcc-4.0.1 --enable-languages=c,c++ . It gives me the following error message when I run make. ... ln -s libgcc_s.1.0.dylib…
djin
  • 21
  • 2
2
votes
3 answers

Boost 1.44 with Python 2.7.1 on RHEL5 using gcc-4.1.2

Ugh! I have hit one of those errors where I am really clueless. I have built/installed Python (2.7.1) and I've built/installed boost (1.44.0) against that version of python. I don't see any errors in my boost build, everything goes through fine.…
squashed.bugaboo
  • 1,338
  • 2
  • 20
  • 36
2
votes
1 answer
2
votes
1 answer

How do I check by using __STDC_VERSION__ if is -std=c1x in use?

I know that for C11, I can test #if(__STDC_VERSION >= 20112L). But for -std=c1x what macro and/or value should I test it? what's the nomenclature of this standard? or maybe a informal name, if any. I hope this is clear. Thanks in advance.
Jack
  • 16,276
  • 55
  • 159
  • 284
1
vote
3 answers

Undefined reference to cmph functions even after installing cpmh library

I am using gcc 4.4.3 on ubuntu. I installed cmph library tools 0.9-1 using command sudo apt-get install libcmph-tools Now, when I tried to compile example program vector_adapter_ex1.c , gcc is able to detect cmph.h library in its include file but is…
1
vote
1 answer

gcc error with Python C API code - "ISO C++ forbids casting between pointer-to-function and pointer-to-object"

The following code fragment does nothing, but illustrates the problem. It was extracted from some Boost Python code, which uses the Numpy C API. This was tested with the backport of a gcc 4.7 snapshot from Debian unstable to squeeze. #include…
Faheem Mitha
  • 6,096
  • 7
  • 48
  • 83
1
vote
4 answers

great size pointer in gcc

I want to define a great size pointer(64 bit or 128 bit) in gcc which is not depend on platform. I think there is something like __ptr128 or __ptr64 in MSDN. sizeof(__ptr128) is 16 bytes. sizeof(__ptr64 ) is 8 bytes. is it possible? it can be…
Mohammad Sheykholeslam
  • 1,379
  • 5
  • 18
  • 35
1
vote
1 answer

Calling gcc by PHP on Redhat

I am calling gcc through PHP by means of exec command. Then gcc gives weird errors such as "stddef.h cannot be found". PHP is running under username "oracle". That is, when we call "whoami" through a PHP script by means of "exec", it gives oracle as…
memento
  • 319
  • 1
  • 2
  • 7
1
vote
2 answers

make_shared create std::shared_ptr? gcc 4.6.2

i'm using gcc 4.6.2. I'm trying to push_back in a vector shared_ptr's. But gcc gives me everytime an error. Here my codelines: std::vector< std::tr1::shared_ptr > procs; std::string line; while (getline(file, line) && line.find(JobMask) !=…
demonking
  • 2,584
  • 5
  • 23
  • 28
1
vote
1 answer

static constexpr method implementation causes gcc bug?

Here is a piece of code: class Class { static constexpr int getBug(); }; constexpr int Class::getBug() { return 0; } What I basically do is declaring a static constepxr method in class declaration, then I implement it. The original code…
Jaffa
  • 12,442
  • 4
  • 49
  • 101
1
vote
0 answers

Installing pyObjC 2.2 on Mac OS X 10.6 returns GCC-4.2 failure

I'm trying to install pyObjC; it failed with: lipo: can't figure out the architecture type of: /var/tmp//ccxHurQP.out error: Setup script exited with error: command 'gcc-4.2' failed with exit status 1" I don't have a clue about how to interpret the…
Mike3d0g
  • 277
  • 2
  • 12