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

Selected processor does not support `dmb ish' in ARM mode

I am building an embedded linux distro on a Beaglebone Black (AM335x chip Cortex-A8 Arm-v7 Instruction set) using crosstool-NG, U-Boot, Kernel (5.5.5) and buildroot. When compiling the kernel I am...

View Article


Size of derived class in virtual base class function

Consider the following codeclass A { int x, y;public: A(){} virtual void PrintSize(){ cout << sizeof(typeof(*this)) << endl; }};class B : public A { int a, b, c;public: B(){}};int main() {...

View Article


unsigned long long int output not working

the following code fails when giving in bigger numbers than 111111111111111111 (19 times 1).although unsigned long long int should hold up to 18446744073709551615 (19 numbers), but 111111111111111111...

View Article

What should I fix when Address Sanitizer says detect_leaks is not supported...

I'm using Clang to compile my project, on x86_64 OS X(MacOS 10.15.5 Catalina).I want to identify exactly from which file, which function, which line causes memory leaks. I am trying to use Address...

View Article

How to expose stack frame size using a gcc plugin

I'm transpiling a high-level programming language (Java) into C and in order to add support for stack bounds checking I need to know the stack frame size of every (transpiled) method I'm invoking. I'm...

View Article


GCC adding underscore to external symbols from .o file

I'm trying to compile an opengl application into one executable file on windows. Everything worked fine on one machine with mingw which I can't tell its version now, while on another machine the...

View Article

Real example code for software pipelining

I'm currently finding a way that can show how software pipelining is applied to the code.for(int i = 1; i < N; i++){ D[i] = A[i] * B[i] + 1;}I found the similar question with the answer using gcc...

View Article

Is it possible to install program from the source code only in the specific...

I'm trying to use conda to manage programs and environments instead of python-specific use.However, I need to install some programs only for the specific environment.For example, I need to install...

View Article


Linkage error when using static library in executable

I am trying to build an executable which should be linked with themosquitto (libmosquitto.a)json-c (libjson-c.a)Also, there is a custom C API built as a static library as well: myCAPI.aMy linux is...

View Article


Performance improvement by rewriting with AVX intrinsics

I have a simple math library that gets linked into a project which runs on simulator hardware (32 bit RTOS) and the compiler toolchain is based on a variant of GCC 5.5. The main project code is in...

View Article

How to compile C code with the "Unix networking programming book" library?

IntroductionI've started following the book Unix Network programming 2003. I've downloaded the source code from the official website here: source code. This includes a README file, which tells you how...

View Article

OSX clang++: Undefined symbols for architecture x86_64 for explicitely...

I have template class defined in .h file and template methods are defined in .cpp file. This .cpp file also contains explicit template instantiation via template clas Class<type>.This use case...

View Article

Assembly: no such instruction `iretd`? What can I use instead? i686-elf-gcc

I have written a keyboard interrupt handler where in my ASM code I have an instruction iretd.When compiling the file, GCC returns an error sayingdrivers/kbd_hndlr.S: Assembler...

View Article


storage register for scanf call in gas

I am trying to understand scanf function a have 3 question regarding it.this is c file:#include <stdio.h>#include <stdlib.h>int main(){ int x; printf("Enter X:\n"); scanf("%i",&x);...

View Article

Aligned and unaligned memory access with AVX/AVX2 intrinsics

According to Intel's Software Developer Manual (sec. 14.9), AVX relaxed the alignment requirements of memory accesses. If data is loaded directly in a processing instruction, e.g.vaddps...

View Article


How to define INT128_MAX and INT128_MIN for __int128?

gcc has the __int128 type natively.However, it’s not defined in limits.h. I’m mean there’re no such things as INT128_MAX or INT128_MIN…And gcc is interpreting literal constants as 64 bits integers....

View Article

Unexpected gcc warning: function returns address of local variable - is it a...

Following is the minimum working example (ok, in fact it's minimum non-working example :-)). When compiled with gcc (from version 5.0 up to 9.3) it fires the following warning. It even seems to fire...

View Article


Portability of Native C++ properties

In Visual Studio, there is __declspec(property) which creates properties similar to C#. Borland C++ offers the __property keyword with the exact same functionality. In the C++0x, there is mention of a...

View Article

Is there an alternative for visual C++ __declspec (property declaration...

There is a Microsoft specific extension, which makes it possible to define property getters and setters like this:// declspec_property.cppstruct S { int i; void putprop(int j) { i = j; } int getprop()...

View Article

arm-none-eabi-gdb: cannot insert breakpoint cannot access memory at address

SetupI am working on W10 and I am encountering a problem while following the tutorial from here. It is about writing baremetal code for ARM Cortex M3. The files produced by the above tutorial are...

View Article
Browsing all 22002 articles
Browse latest View live


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