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

Initializing an array with NULL pointer with GCC throw error

I am using GCC and IAR to compile some C code.#include <stdio.h>#include <stdint.h>#include <stddef.h>uint8_t tab[] = NULL;this exmple code throw this error with GCC : error: invalid...

View Article


gcc Auto-Vectorization - Understanding output messages

I'm currently trying to understand the output of the gcc Vectorizer.I compiled my program using -O2 -ftree-vectorize -fopt-info-vec-all and gcc 8.2.0.However, I do not understand, what is meant by some...

View Article


Cross compilation for gpsd shows "unrecognized option"

I am cross-compiling gpsd3.20 on my Ubuntu 16.04 for the ARM architecture. As you may know, gpsd uses Sconsctruct to compile the source codes. During my cross-compilation, the moment when it needs to...

View Article

Differences in custom and std fetch_add on floats

This is an attempt at implementing fetch_add on floats without C++20.void fetch_add(volatile float* x, float y){ bool success = false; auto xi = (volatile std::int32_t*)x; while(!success) { union {...

View Article

Linux, C++ - libraries in libraries, gcc, code::blocks linking error [duplicate]

code::blocks version 17.12Ubuntu MATE 19.10 1.22.2gcc - 4:9.2.1-3.1ubuntu1libavahi-client3 - 0.7-4ubuntu5 (although probably not relevant)I have C++ app which uses avahi to communicate across the...

View Article


About OpenMP with gnu gcc

I have Windows 8 64bit operating system. I wanted to experiment with following C code for OpenMP functionality:hello.c program#include <stdio.h>#include <stdlib.h>#include<omp.h>int...

View Article

How can resolve Qt serial port error " is not a member of &qserialport while...

i am using in Qt Creator 3.5.1 (opensource) Based on Qt 5.5.1 (GCC 4.9.1 20140922 (Red Hat 4.9.1-10), 32 bit). the problem is while build the project controller pc the error occurred "is not a member...

View Article

Can GCC only compile code for one specific architecture and operating system?

GCC is a compiler collection that generates machine code from different programming languages. For that you have to compile the compiler to run on your architecture and operating system. But you also...

View Article


C file not compiling successfully in VS code even though gcc working

When I type gcc, it does not show any error meaning compiler working andgcc -g main.c -o file.exe does not create an.exe file to execute;when I run the code it gives :cd...

View Article


MinGW GCC -- Single 32-bit and 64-bit cross-compiler?

I've downloaded MinGW with mingw-get-inst, and now I've noticed that it cannot compile for x64.So is there any 32-bitbinary version of the MinGW compiler that can both compile for 32-bit Windows and...

View Article

How do I debug a bison program on a unix system?

I have made a compiler for a subset of C called the BabyC using the Bison and flex. My program consists of the following files: ast.c,ast.h, linkedList.c, linkedList.h, BabyC.y, BabyC.l, main.c,...

View Article

Conflicts between installed library and my code due to compiler variation on...

I am using c++ to develop my software on ArchLinux. If I install a library, for example, libffmpeg, from the official source, such as apt on Ubuntu, pacman on Archlinux.However, in my project, I use...

View Article

Can GCC optimize code size for functions with the same body?

I'm debugging a C++ program with GDB and faced that different functions turned out to be the same. Here is what I mean by that:some.hppclass Base{ virtual bool foo() const; virtual bool bar()...

View Article


GCC compiler gives different results for Windows and Linux? [duplicate]

float i = 2.5f;printf("%f, %d", floor(i), ceil(i));This is giving output: 2.000000, some garbage value.But for gcc 32-bit Linux platform answer is 2.000000,0Why is that?

View Article

Compile-time AVX detection when using multi-versioning

I have quite big function compiled for two different architectures:__attribute__ ((target ("arch=broadwell"))) void doStuff(){ doStuffImpl()}__attribute__ ((target ("arch=nocona"))) void doStuff(){...

View Article


GCC Plugin: Is it possible to move a sequence of a basic block of one...

I'm trying to create a plugin for gcc that allows you to instrument the prologue and the epilogue of a function.The instrumentation code is inserted in two functions "instrument_entry" and...

View Article

Execute cpp/exe from TCL

I would lo call call_c_code cpp/exe from TCL.I have tried the following code:#!/usr/bin/tclshset scripts_path call_c_code.exeexec gcc -c $scripts_path >@stdout 2>@stderrBut I have the following...

View Article


Why does gcc -O3 handle avx256 compare intrinsic differently than gcc -O1 and...

I want to set two integer vectors and compare them with SIMD, and later on use this mask for a blend operation on packed floats. I produced the following code:#include <immintrin.h>#include...

View Article

Image may be NSFW.
Clik here to view.

can you guys help me to debug a simple c program with gcc and make it work?...

Hello guys so my question is can you help me to debug a simple c program with gcc and make it work?The teacher gave me this code and I should debug it and make it work, i tried but without any help I...

View Article

How do I compile tree-sitter parsers?

I'm trying to compile the typescript, tsx, and python parsers for use with neovim, but when I run gcc -o parser.so -shared src/parser.c -Os -I./src as instructed by the tree-sitter tracking issue I...

View Article
Browsing all 22002 articles
Browse latest View live


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