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.

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 ...
CorkiMain's user avatar
-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&...
Daniel R. Collins's user avatar
-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 ...
Anon's user avatar
  • 3,649
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. ...
Anon's user avatar
  • 3,649
8 votes
1 answer
16k views

I am curious about the Difference between direct and indirect function() calls Could anyone help in the diff analysis ? The c source code could be found at subroutine_direct.c and ...
kevin's user avatar
  • 197
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 ...
user avatar
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) ...
Borph's user avatar
  • 131
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, ...
Nergal's user avatar
  • 313
0 votes
0 answers
143 views

I tested out a few different compiler optimizations on GNU GCC, in the CodeBlocks IDE. With each different optimization I ran the same test: I let my program try to build as big of a tree as it could ...
Inertial Ignorance's user avatar
0 votes
1 answer
125 views

I am peeking through the code of torsocks where as you'll notice, the .travis.yml file instructs Travis CI to test against both clang and gcc. compiler: - clang - gcc I'm still learning and this ...
Alex V's user avatar
  • 111
0 votes
0 answers
115 views

I'm in the process of writing a 8 bit cpu emulator and currently have a jump table for different opcodes. I want to move this over to be cycle accurate and was wondering what the best approach would ...
silent's user avatar
  • 176
63 votes
9 answers
14k views

A friend of my family asked me for a bit of help as he learns to program (in the C language). As we were talking, he expressed frustration about having a hard time understanding the error messages his ...
einpoklum's user avatar
  • 2,808
-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?
TonyI's user avatar
  • 19
2 votes
1 answer
106 views

In the following code, int() is an explicit type conversion. #include <iostream> int main() { void* ptr = int(); return 0; } Clang Compiler: source_file.cpp:5:11: error: cannot ...
Jemes's user avatar
  • 133
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 ...
yoyo_fun's user avatar
  • 2,297

15 30 50 per page