Skip to main content

Questions tagged [gcc]

GCC is the GNU Compiler Collection. It's the de facto standard C compiler on Linux and supports many other languages and platforms as well.

1 vote
2 answers
900 views

I need to try the following thing: I would like to compile some simple C code samples and see the assembly listing generated by GCC for IA64 architecture, i.e. I just want to run GCC with the -S ...
0 votes
0 answers
163 views

Recently, I started learning Arm64 assembly. The assembler I'm using is the GNU Assembler (GAS). The version of GAS I'm using is GNU assembler (GNU Binutils for Ubuntu) 2.42. I want to make my code ...
2 votes
3 answers
3k views

With 'global variables', I mean Variables on namespace level Static data members in classes Static variables in functions In a big C++ project I would like to have a mechanism (like a compiler option) ...
-3 votes
1 answer
300 views

The GNU compiler toolset has a profiler "gprof" for performance analysis of C++ programs. With the -pg switch, the gcc compiler will make executables that write a data file, "gmon.out&...
290 votes
7 answers
453k views

Advanced compilers like gcc compile code into machine readable files according to the language in which the code has been written (e.g. C, C++, etc). In fact, they interpret the meaning of the code ...
4 votes
3 answers
7k views

Okies, totally newbie question here. I can read the code, mimic the code and understand the basics to be deadly. But, I never really took the time to understand what ANSI C really meant. I just look ...
12 votes
6 answers
3k views

Anyone knows a solution that works something like this: #include <stdio.h> #include <gcc.h> /* This .h is what I'm looking for. */ int main (void) { /* variables declaration (...) */ ...
13 votes
3 answers
12k views

Since 4.8 release, the C++ compiler GCC (the G++ part of it) is written not in C anymore, but in C++ itself. I have a hypothetical question on this. I wonder how to compile the C++ code of GCC on a ...
11 votes
2 answers
19k views

I noticed that if I declare a global variable multiple times the compiler does not even output a warning. However if I declare a local variable in a function multiple times, for example, the gcc ...
3 votes
4 answers
3k views

Long story short, I wanted to use C as a scripting language and in a portable manner so I created a register-based, JITless VM to accomplish this. I've formalized the VM's ISA, script file format, ...
1 vote
3 answers
3k views

If I write this code in a function: void func(void) { int x = 0; int y = 3724832+x; } It would (probably) optimize the variable y out because it isn't being used. Even if I'm wrong about this ...
23 votes
5 answers
22k views

I'm learning C++ and I'm using g++ on Linux for practicing. I want to know if people working as programmers use g++ -pedantic flag and also its importance in real world. What about other compilers, ...
-1 votes
2 answers
968 views

I have the task to port some code from Visual C++ to gcc. Some calls are gcnew and gcroot to handle managed code inside cpp module. How can these calls be ported to gcc in a fashionable way?
-2 votes
1 answer
1k views

I have a large hash, around 6 gigabytes that I load into memory. On my current laptop that I develop from, it really does a number on my system, causing massive amounts of lag while I try to go about ...
1 vote
2 answers
2k views

I had to increment my integer twice in a loop, so I thought I would try and be clever: for (int i = 0; !sl.isEmpty(); ++i++) { ... } ++i++ however is not an assignable expression, at least in GCC. ...

15 30 50 per page