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

How can I fix gcc error when install multidict in alpine docker container?

Q: In my docker container, i use apline linux system which has been pre install gccapk info:bash-4.4# apk info .... gcc But when I install multidict, failed by gcc errorbash-4.4# pip install multidict...

View Article


Using builtin overflow functions with uint64_t types

I am currently writing a program which makes heavy use of the uint64_t type, to enhance compatibility across platforms. As it happens, there are a lot of possibilities for overflows in my program, so I...

View Article


Is it possible to add two float inside the for loop?

I'm creating a simple grade calculator with C++, I'm just new in C++, and I am practicing it, but I am having a problem with my method or with my code, hope you'll help me out with this one. I don't...

View Article

if one liner O3 optimization behavior issue [closed]

My code looks like thisint condition = 0; // some code makes condition might not be 0 bool flag = condition ? 1:0; In GCC debug mode (-O0), flag value is either 1 or 0 as expected. However, in GCC...

View Article

Profile Guided Optimization - __gcov

I am trying to run profile guided optimization on my code with -fprofile-generate flag. When I compile with it, I am getting the following error.obj\Debug\main.o||In function...

View Article


cmake: how to add a compiler flag according to current compiler version

I have a c library to maintain, which is built by cmake. When I start to build it, it tells me that cc1: warning: unrecognized command line option "-Wno-incompatible-pointer-types" [enabled by default]...

View Article

gfortran 8.2.1 produces large object files

I tested a simple piece of fortran code, MODULE Mytest TYPE MY_DATA SEQUENCE integer :: A(1000, 1000) REAL :: B(1000, 1000) END TYPE MY_DATA END MODULE Mytest Compiled using gfortran. In the case of...

View Article

Why is my factorial program working but my almost identical pow program is...

Here is my factorial program—this is executing and giving a correct result:#include <stdio.h> int main() { int n; printf("enter the no="); scanf("%d", &n); fun(n); printf("%d\n", fun(n));...

View Article


How to get stack usage in gcc when link-time optimization is enabled?

I's using arm-none-eabi-gcc 9.2.1 to develop programs for Cortex-M0, I found that the option -fstack-usage does not work if -flto is used. Is it possible to do static stack usage analyze when...

View Article


Using GCC Undefined Behavior Sanitizer

Today I have read an article about GCC Undefined Behavior Sanitizer (ubsan). However, when I follow steps there (add -fsanitize=undefined to my code), the compiler (GCC 4.9.2 on Ubuntu 15.04) says that...

View Article

Compiling a C program that uses OpenGl in Mac OS X

I am trying to compile a C program for my CS class. I have Command Line tools installed on my Mac, so I probably have OpenGL. The program description was made for Ubuntu and it says for me to compile...

View Article

Using library paths in makefiles

I have written a makefile like this:HEADER = -I./cygdrive/c/cpros/kajj/source4 LIBB = -L./cygdrive/c/cpros/kajj/source1 -L./cygdrive/c/cpros/kajj/source2 LIBRA = -larith -ldekk target : game.o gcc...

View Article

GCC can't compile glib without optimizations in Ubuntu

I am trying to compile a more updated GlibC (2.14), that is required by a software that I need.During it, I ended having the same problem as described in this thread: glibc not properly compiling,...

View Article


gcc ON arm/android

I just got a EEE pad transformer. Like any hardware I own I'd like to have a C compiler on it. I know I can cross compile, but I'd like to do development ON the device itself. I've searched google and...

View Article

firmware grow bigger after enable gcc coverage

I am implementing gcov on an android device, and it's system image has a size limitation. My problem is that the system image grow 7M or more after I enable gcov by adding my_cflags += --coverage...

View Article


Returning new object from function defined using Concepts

Code#include <type_traits> template <typename N> concept Number = std::is_arithmetic<N>::value; template <typename T> concept VectorXY = requires(T t) { {t.x} -> Number;...

View Article

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


Why does this C++ program capturing lambda argument by reference segfault?

Here is a minimal program that segfaults with gcc-8.3.0, compiled with -std=c++2a:struct Command { double x; }; template <typename T> struct AutoBrake { AutoBrake(const T& publish) : publish{...

View Article

Why .bss size decrease when adding an initialized static variable?

I understand that the default alignment of .bss is 8 bytes for GCC as mentioned in this question Why the int type takes up 8 bytes in BSS section but 4 bytes in DATA sectionSo with this program:int...

View Article

In Debian Error: "command 'gcc' failed with exit status 1" (pip install)

Hello. My have a goal, install pocketsphinx in python3 (3.7.5) or python3.8 (3.8.1). When I try install (in python3) module pocketsphinx, I can see more problem. The last, what I can't solve, this is...

View Article
Browsing all 21994 articles
Browse latest View live


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