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

Can a fast interrupt handler call a non-fast-interrupt-handler function?

If I have a fast interrupt handler (by adding __attribute__((interrupt("FIQ")))), can I invoke other non-fast-interrupt function inside the handler? For example,void f() {//...} void g() {//...} void...

View Article


gcc error: asm/linkage.h: No such file or directory

im trying to compile a c program on ubuntu virtual machine, and when i run gcc sniff.c -o sniff(sniff.c is the name of my program) it shows me the error : asm/linkage.h: no such file or directory. I'v...

View Article


gcc -W -Wall -O -pedantic -std=c99 vs clang with same options

Trying to output a pointer's address in decimal form using the %zu conversion specifier. Runs okay as expected except that GCC warnsformat ‘%zu’ expects type ‘size_t’, but argument 4 has type ‘long int...

View Article

Why cast zero to pointer type and access its member work?

Recently, I saw something cool.#define container_of(ptr, type, member) ({ \ const typeof( ((type *)0)->member ) *__mptr = (ptr); \ (type *)( (char *)__mptr - offsetof(type,member) );}) Basically, I...

View Article

How to have inline functions in multiple files

My project has the following 4 files: main.c, rcm.h, rcm.c and queue.c.In rcm.h I'm declaring all functions implemented in rcm.c and queue.c.rcm.c looks like:#include "rcm.h" void rcm (void) { Queue *Q...

View Article


Why doesn't this compiler barrier enforce ordering?

I was looking at the documentation on the Atmel website and I came across this example where they explain some issues with reordering.Here's the example code:#define cli() __asm volatile( "cli" :::...

View Article

What files can be safely deleted from the MinGW-w64 binaries?

I am using the MinGW-w64 installer found here:https://mingw-w64.org/doku.php/download/mingw-buildsInstalling to a directory creates a folder called mingw32 or mingw64 that contains the compiler. I...

View Article

What is lto1.exe?

when you inspect mingw you will find the c compiler cc1.exe (funny growing in size in 9.2 it is almost 25 MB ) cc1plus.exe is c++ compiler (same sizes) collect2.exe is linker (afiak) nut what is...

View Article


Why do we need the DWARF eh_frame emitted by compilers?

I have red that eh_frame is needed for stack unwinding during debugging or when our code hits an exception.Now my questions is, can't the debugger just walk the stack and figure out the boundaries...

View Article


How to edit a number which is at a specific location in a given file in C?

I have saved a list of number as 1 2 3 4 5 6 7 8 9 10 in the file INPUT.txt. and I want to edit a specific location (which is the 5th element here) and want to replace it by number 35. How can I do...

View Article

Image may be NSFW.
Clik here to view.

Format specifer in C++

I'am trying to understand a C++ compiler behaviour. Here is a code, where I made two mistakes intentionally:forgot %ld format specifier in scanf and just wrote %.added unknown format specifer for...

View Article

How to downgrade GCC in windows Ubuntu?

I been trying to downgrade my Windows Ubuntu GCC compiler and what I've done so far issudo apt-get updatesudo apt-get install gccgcc --version which gives me: gcc 7.4.0sudo apt-get install gcc-4.6...

View Article

xcode installed but cannot find macOS_SDK_headers_for_macOS_10.14.pkg

I have an issue with compiling gcc which can be traced back to Catalina having issues with xcode, so I referred to the link here "macOS_SDK_headers_for_macOS_10.14.pkg is incompatible with this version...

View Article


Why doesn't gcc link an SDL 2.0 C project? (macOS) [duplicate]

I wrote a simple Chip-8 emulator in C (mostly taking inspiration from this; to be honest, just rewriting it in C). It uses SDL 2.0, which I definitely have installed.As I tried compiling the files (gcc...

View Article

How to change GCC's default sysroot?

If you run gcc -print-sysroot it will print out the location default sysroot. This also works for cross compilers, for example:docker_user@8d9f484fffc7:/build_env$...

View Article


Image may be NSFW.
Clik here to view.

Variable type matching problem with Eigen

I am using Eigen on google cloud platform on an ubuntu machine. I have installed gcc-7 and I am trying to run a C++ code containing a huge matrix (1000X1000) of doubles. The code is running fine on...

View Article

Performance of dynamically sized arrays MSVC vs GCC [duplicate]

Today a little argument erupted over the following code line in a fairly time-critical piece of C++ that was running.void func(std::string& str) { ... uint8_t buffer[str.size() + 10]; ... } Now...

View Article


Performance with dynamically sized arrays in C++ MSVC vs GCC [duplicate]

Today a little argument erupted over the following code line in a fairly time critical piece of C++ that was running.void func(std::string& str) { ... uint8_t buffer[str.size() + 10]; ... } Now...

View Article

Centos7 g++ "to_string is not in a member of std"

I have some pretty standard C++ code, in which I am using to_string to add a sting and an int together, like this:#include <string> using namespace std; class Color{ public: int red, blue, green;...

View Article

Stack Frame not correct with GCC and STM32

I am trying to create simple SVC Handler in GNU GCC (Not ARM GCC). If SVC service is called, it enters SVC_Handler() correctly, but when I try to find the SVC number used to call SVC Handler...

View Article
Browsing all 21994 articles
Browse latest View live


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