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

Anaconda and its libraries in macOS Catalina

Apple is constantly introducing changes to how it handles a range of issues. Some are, I assume, security-related. This affects programming environments such as Python (Anaconda) and R and others....

View Article


Preprocess the Linux source code and save to another directory

Suppose I have the entire Linux source code in /tmp/linux-src. After menuconfig I want to do "some kind of gcc -E" where all the preprocessor macros other than #include are expanded so the actual...

View Article


Compiler Error:Undefined symbols for architecture x86_64

#include<stdio.h> int main(void) { return 0; } environment :mac & visual studio codecommand:gcc kk.c -o kk && ./kk Undefined symbols for architecture x86_64: "_main", referenced from:...

View Article

Can't compile a C program on a Mac after upgrading to Catalina 10.15

There's a previous question Can't compile C program on a Mac after upgrade to Mojave, and the answers to that have covered most of the variations on what goes wrong.Now — as of Monday 2019-10-07 — you...

View Article

Disable variable-length automatic arrays in gcc

I couldn't disable it even though by using -std=c89 flag. How can I disable it?

View Article


which is the latest C cross compiler for u-boot2019 and linux kernel?

i want to compile u-boot2019,but it is for gcc6.0+.*** Your GCC is older than 6.0 and is not supported I can only search for"arm-none-linux-gnueabi-gcc" and "arm-linux-gnueabihf-gcc" for 2014.Thanks in...

View Article

Why libgfortran.so.5 is not located after upgrade to the newest gcc?

I'm running Centos 7 with default GNU Fortran (GCC) 4.8.5. Recently, I've installed GCC 8.2.0 in the non-standard directory /home/apps/gcc-8.2.0-install. I've also updated paths in my .bash_profile to...

View Article

Visual Studio Code: arguments not passed to C command line application

I have started using Visual Studio Code on Kali Linux 2019.4. I am compiling C code using the Code Runner extension. I am experiencing an issue where arguments passed to the application via "args":...

View Article


std::mutex::lock() produces weird (and unnecessary) asm code

I was checking generated asm for some of my code and my eye caught some interesting stuff:#include <mutex> std::mutex m; void foo() { m.lock(); } generated asm code (x86-64 gcc 9.2, -std=c++11...

View Article


Set more characters than declared without any warning

I've reproduced it with simple example:#include <stdio.h> int main(int argc, char **argv) { char l1[16]; sprintf(&l1, "%s", "Hello AKIT!!!!!!!!!!!!!!!!"); printf(l1); printf("\n"); return 0;...

View Article

Virtual function overloading in diamond hierarchy produces different results...

Folowing code produces different results on clang.#include <iostream> struct Dummy1 {}; struct Dummy2 {}; struct A { virtual void foo(Dummy1) { std::cout << "A"<< std::endl; } virtual...

View Article

How to enable -Werror using GCC pragma?

I have a few files where i'd like to be strict about warnings, and i use GCC to build my project.I've tried #pragma GCC diagnostic error "-Wall" as per...

View Article

Can it really more optimal to fetch 16 bytes as data with a single...

Consider this C code and the generated (by GCC) assembler code for it: + cat x.c 1 struct S 2 { 3 int a, b, c, d, e; 4 }; 5 void foo(struct S *s) 6 { 7 s->a = 1; 8 s->b = 2; 9 s->c = 3; 10...

View Article


Build/Run CentOS based application on Ubuntu

I currently have a C++ application that was originally compiled and ran perfectly on a CentOS-6 machine and requires GCC-4.47 to compile. I've gotten it to compile on an Ubuntu machine (with GCC-4.4.7)...

View Article

Why does GCC not assign the static variable when it is initialized to 0

I initialize a static variable to 0, but when I see the assembly code, I find that only memory is allocated to the variable. The value is not assigned And when I initialize the static variable to other...

View Article


Performance of vector::size() : is it as fast as reading a variable?

I have do an extensive calculation on a big vector of integers. The vector size is not changed during the calculation. The size of the vector is frequently accessed by the code. What is faster in...

View Article

golang gcc c++ existing static library can not be used when making a PIE...

I tried to link an existing C++ library to go code. The C++ library only has a static library and a header file, no source code. I used swigc to generate a libfoo.go and I wrote a simple libb.go to...

View Article


Not getting warning for implicit declaration of function [closed]

In one of my projects, for the functions that are defined elsewhere, I didn't include header file containing declaration. Still I'm not getting warning for implicit declarationThis is the entire...

View Article

gcc -Wparentheses warns for b=1; !a & b but not !a & 1

Consider following short program:int main() { int a = 5, b = 1, c; c = !a & b; c = !a & 1; return c; } Does anyone know why gcc gives a warning for c = !a & b; but not for c = !a &...

View Article

Installation of SciRuby failed on Mac OS X

I am trying to install SciRuby on Mac machine but the installation failed. I have searched this issue but didn't help much and the issued were related to a different error. when I used the commandgem...

View Article
Browsing all 21994 articles
Browse latest View live


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