Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Browsing all 22000 articles
Browse latest View live

How to downgrade the gcc compiler?

I have to run a code. The code includes mex files. For building that code, it required gcc version of 4.4. Following is the description of systemWindows 10Visual Studio 2012Matlab 2017aAnd gcc version...

View Article


Necessity of building a cross compiler

I am using a 64 bit linux machine I was doing some operating system development, where it is said that you need to use a cross compiler to generate code for the target system. The barebones tutorial...

View Article


Why do I find some never called instructions nopl, nopw after ret or jmp in...

This question already has an answer here:Why does GCC pad functions with NOPs? 3 answersWhen I compile code with gcc - (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0 - I find in the compiled code some unused...

View Article

MinGW with gcc 9 on Ubuntu? [closed]

I can’t figure out where to "get" mingw with gсс 9.When I tried to install it using apt-get install mingw-w64, i got gcc 7.3.Maybe there is some repository with the new version?

View Article

Using GCC with new glibc and binutils to build software for system with older...

I have a question since some months and I can't come to an answer with Google for a long time.Background: I am cross compiling software for arm based controllers which are running the linux...

View Article


GCC: Building cross-compiler for ARM - pthread.h not found

Using a Ubuntu 12.04 host, I carefully followed this SO answer here (Recipe for Compiling Binutils and GCC Together) to build GCC and binutils in one tree with all of their dependencies.Here is the...

View Article

Example of memory reordering

I am trying to find out an example of memory reordering, so that i can demonstrate the use of barrier (asmvolatile (“” : : : “memory”))I copied the code from one of the stackoverflow question, and...

View Article

Using BX in Thumb code to call a Thumb function, or to jump to a Thumb...

I'm trying to learn skills useful in firmware modding (for which i don't have source code) These questions concern use of BX from thumb code to jump or call other existing thumb code.How do i use BX to...

View Article


How to get a compile time error in constant evaluated expression?

I have an Assert function that I use to evaluate assertion:if the precondition fails at runtime, this function will output an error message and it will terminate the program.if the precondition fails...

View Article


How to compile a directory source files a library and link it to another ko...

I am new to kernel build system. I have an folder 'x' having source code and makefile to generate x.koI am trying to introduce a new folder 'y' which should be compiled as a library 'y.a' and must be...

View Article

Conflicting register allocation in GCC x86_64 asm. Lifetime ignored

I have a function containing a small assembly block. The assembly for this function compiled by GCC is incorrect since it assigns the same register to two different variables. This is the function...

View Article

Difference between -ffreestanding and -nostdlib when compiling with gcc

I am using a 64 bit linux machine with a x84-elf64-gcc compiler. I have just started low level programming and would like to understand how C code is actually translated into binary. This is mainly for...

View Article

Why is a function prototype not needed in C if there is no return in a...

As expected following code generates an error if prototype double cubenum(); is not declared as required in C. #include <stdio.h> #include <stdlib.h> int main() { printf("Answer is: %f",...

View Article


Loop unrolling and SSE -- clang vs gcc

Disclaimer: full code can be found here.16 byte alignmentGiven a fairly simple type to support proper SSE alignmentstruct alignas(16) simd_pack { std::int32_t data[4]; }; and a function that adds two...

View Article

Cannot update GCC to latest version

I am trying to update GCC using:sudo yum install gcc-c++ And I receive the output:Package gcc-c++-4.8.5-39.el7.x86_64 already installed and latest version Nothing to do For some context, I need at...

View Article


Understanding cin.fail() and cin.clear - Vector Appending Program

This is my first post to Stack Overflow, please forgive me if I have overlooked any formalities in the following postI am currently writing a C++ program on Code::Blocks 17.12, using the GNU GCC...

View Article

Failing to compile a 15+ year old MUD codebase written in C

I used this codebase to run a mud in the early 2000s, and through that, to teach myself some very elementary coding.I just got a copy of the codebase from the administrator/coder who ran the server...

View Article


How to automatically generate a stacktrace when my program crashes

I am working on Linux with the GCC compiler. When my C++ program crashes I would like it to automatically generate a stacktrace.My program is being run by many different users and it also runs on...

View Article

Python3 cross-compilation make failure

I have build sdk using crosstool-NG 1.24.0target: Architecture- i686 (32 bit amd) Binutils:2.32 kernel: 4.9.156 Glibc: 2.19 Gcc: 7.4.0 SDK build was successful. Now i am trying to cross-compile...

View Article

(int vs. int*) - Why does the address always change with int* and not int in...

I am having a hard time understanding why the address of int* always changes while a regular int always stays the same. I assume since I'm using the 'new' keyword, the int* pointer will be dynamically...

View Article
Browsing all 22000 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>