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

How to disable fast math for a header file function

How do I disable fast math for a function defined in header file or for the entire source file? #pragma GCC optimize ("no-fast-math")Adding the line above to both (source file and header file) doesn't...

View Article


Image may be NSFW.
Clik here to view.

gcc 10.1: weird behavior with clang-tidy (clion) and precompiled headers (cmake)

I have had problems with my IDE since an update to GCC 10.1 a few days ago. I use CLion, which uses clang-tidy as linter. I also use the newly introduced command target_precompiled_headers from CMake...

View Article


GHC can't find foreign library (libjack.lib) that works with mingw gcc (but...

Objective:I am writing a haskell program on Windows 10 using stack and the bindings for jack from hackage. Jack is installed and its lib/include paths are provided to ghc. My objective is to build the...

View Article

How are local variables stored on the call stack (GCC compiler)

I apologize if this has been asked before, I did try looking at old questions but I am still confused as to how the GCC compiler stores variables on the stack. I understand that it grows downward but...

View Article

GNU assembler Macros

I am trying to build a simple macro in GNU assembler (2.26.1) (gcc 5.4.0) but getting some error after several interactions: Invalid character '(' in mnemonicI've tried to follow the advice at...

View Article


iostream vs ostream what is different?

As the book says (Exploring C++: The Programmer's Introduction to C++):The istream header declares input operators (>>), and ostream declares output operators(<<).I can perfectly run the...

View Article

Can this piece of code be modified such that it works with fast-math enabled?

Can the code below be modified such that it works correctly even when compiled by GCC with fast-math enabled? #include <iostream>#include <float.h>using namespace std;int main(){ char...

View Article

Should clang and gcc produce a diagnostic message when a program does pointer...

This program compiles without errors, for example with clang -Wall -std=c11 a.c and gcc -Wall -std=c11 a.c. Is this a bug in clang and gcc? Because arithmetic is not defined on pointers to function...

View Article


Why qemu execute the bin of mipsel failed?

1.This is my mips assembly code .dataout_string: .ascii "hello \n" .text .global mainmain: li $v0, 4 la $a0, out_string syscall li $v0, 10 syscall2.Then I as the codemipsel-linux-gun-as --march=mips2...

View Article


Image may be NSFW.
Clik here to view.

I am trying to split this code into two .c and one .h file, but the structure...

I have made a code which runs perfectly fine in a single file but when I try to split the code into two .c and one .h file the makefile shows an error of UNDEFINED REFERENCE TO THE STRUCTURE which is...

View Article

I have a technical issue compiling with mpicc

My gcc works fine when I compile '''gcc''' but I'm trying to compile a C program with '''mpicc''' and my terminal returns this error, which deletes also the...

View Article

How to link to a shared library using Automake

Having spent most of my development career in IDE I'm currently attempting to extend an Opensource project C-ICAP that uses Autoconf and Automake, so this may be a glaringly obvious answer to those...

View Article

Strange memory issue with sscanf

Using gcc-arm-none-eabi-5_42016q3-20160926 tool chain in eclipse.Processor: STM32F030I have a 3 line program that starts before any hardware initializations to isolate the problem: int a; char *...

View Article


Is "char" a special type of integer variable?

I recently came across a statement saying that "char" type in C is really a special form of integer – one that stores the ASCII code numbers which represent characters and symbols.How far is this...

View Article

Why do I get no error when I pass too many arguments? [duplicate]

I have an Atollic True Studio (Eclipse) project with many files.I have noticed that the project compiles despite the fact that one of those files contains a function call with arguments where the...

View Article


Loop fission/invariant optimization not performed, why?

I am trying to learn more about assembly and which optimizations compilers can and cannot do.I have a test piece of code for which I have some questions.See it in action here:...

View Article

Linking shared libraries with dependencies

I have a program which is dependent upon a library (called "libFoo.so" here). libFoo.so is also dependent upon a number of other libraries: libVendor.so, libFooVendor.so, and liblog.so. Whenever I try...

View Article


Weird linker error gcc when following simple kernel tutorial

Im following this tutorial on how to make a simple bootable kernel: http://www.osdever.net/tutorials/view/writing-a-simple-c-kernelthere are the following required files in the tutorial:kernel.csource...

View Article

installing pf-ring on Mac OS X

I'm trying to install pf-ring on mac os x yosemite 10.10.4. Doing what's written here: http://www.ntop.org/get-started/download/so:git clone https://github.com/ntop/PF_RING.gitcd PF_RING/kernelso far...

View Article

Compile error, when building tensorflow v1.14.0 without avx2 support

Using Debian 10 Buster, Python v2.7.I try to build specific tensorflow v1.14.0 without avx2 support, because I get following error:Nov 4 17:12:32 moodle37 kernel: [9773297.574293] traps:...

View Article
Browsing all 22015 articles
Browse latest View live


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