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

std::packaged_task should have deleted copy c'tor with const parameter

Link https://cplusplus.github.io/LWG/issue2067 provides the following discussion:Class template packaged_task is a move-only type with the following form of the deleted copy operations:...

View Article


setup script exited with error: command 'x86_64-linux-gnu-gcc' failed with...

When I try to install odoo-server, I got the following error: error: Setup script exited with error: command 'x86_64-linux-gnu-gcc' failed with exit status 1 Could anyone help me to solve this issue?

View Article


Why is %f working incorrectly for large double numbers in print statement?...

double a = 1E100 printf("%f", a); It seems to be printing a different value other than 1 followed by a 100...

View Article

GCC: ld.exe cannot find file

I have a C++ project with external libraries, but I don't manage to make it work. When I try to specify a certain external library file, it seems that ld.exe cannot find it; I tried relative path,...

View Article

fatal error: limits.h: No such file or directory

On OSX, I can't compile simple programs from the command-line when I use an externally-provided compiler (e.g. gcc, or a custom clang install). System headers like limits.h cannot be found.Example...

View Article


Optimization of copying with an explicit byte order in arm-none-eabi-gcc

In writing part of a deserializer for a data structure in C, I needed a way to read 16-bit and 32-bit integers. Given that there is a possibility that this code may be compiled for and used on an...

View Article

Image may be NSFW.
Clik here to view.

Trying to skip vtable and inline call in a case where type is known

Update: This seems to be specific to gcc < 4.9, which improved devirtualization. On a polymorphic class hierarchy I have a non-virtual interface function (let's call her algorithm) that calls some...

View Article

How to specify -march=native using pragmas (or otherwise) in gcc

I would like to specify the compiler options for my C code that will be compiled in gcc. I need to do this from within the code because of the way the code will be deployed. This is the code currently...

View Article


When is it necessary to use the flag -stdlib=libstdc++?

When is it necessary to use use the flag -stdlib=libstdc++ for the compiler and linker when compiling with gcc?Does the compiler automatically use libstdc++? I am using gcc4.8.2 on Ubuntu 13.10 and I...

View Article


What's the difference among cflgs sse options of -msse, -msse2, -mssse3,...

For the GCC CFLAGS options: -msse, -msse2, -mssse3, -msse4, -msse4.1, -msse4.2. Are they exclusive in their use or can they be used together?My understanding is that the choosing which to set depends...

View Article

Running Boost library but getting clang error when using gcc on Mac

I am trying to run this example (from: https://theboostcpplibraries.com/boost.serialization-archive#ex.serialization_01):#include <boost/archive/text_oarchive.hpp> #include <iostream> using...

View Article

undefined reference to `_GLOBAL_OFFSET_TABLE_' in gcc 32-bit code for a...

I have a small c code file(function.c):int function() { return 0x1234abce; } I am using a 64 bit machine. However, I want to write a small 32 bit OS. I want to compile the code into a 'pure'...

View Article

How to assert if a std::mutex is locked?

With GCC 4.8.2 (on Linux/Debian/Sid 64 bits) -or GCC 4.9 when available - in C++11- I have some mutexstd::mutex gmtx; actually, it is a static member in some class Foo containing both alpha and beta...

View Article


gcc: error: unrecognized command line option...

During build of Firefox (older versions including 56.0, 57.0), I encountered the following error a lot of times:gcc: error: unrecognized command line option ‘-fsanitize-coverage=trace-pc-guard’; did...

View Article

GCC: Should undefined behavior of overflows preserve logical consistency?

The following code produces strange things on my system:#include <stdio.h> void f (int x) { int y = x + x; int v = !y; if (x == (1 << 31)) printf ("y: %d, !y: %d\n", y, !y); } int main () {...

View Article


GCC and installing C so I can run VSCode on my MacOS

I'm a very new programmer and I've been using VSCode for running HTML with no problem. However, I need to run C for my CS class but I get an error whenever I type "gcc". How can I solve this? How it looks

View Article

explicit specialization of template class member function

I need to specialize template member function for some type (let's say double). It works fine while class X itself is not a template class, but when I make it template GCC starts giving compile-time...

View Article


Compiler change msvc 2019 vs. 2017 and gcc (mingw32) and error C2039

This is a request for feedback from anyone who would like to respond. Otherwise, since I already have a fix, this request can be closed very fast. My question:Why does MSVC flag this as an error, while...

View Article

Setting up Linux-C-DB2 environment

I'm trying to set up an environment for learning: writing and testing simple C programs to perform DB2 database operations on an Ubuntu 18.04. system.I installed DB2 with help of web tutorials and IBM...

View Article

Why does GCC aggregate initialization of an array fill the whole thing with...

Why does gcc fill the whole array with zeros instead of only the remaining 96 integers? The non-zero initializers are all at the start of the array.void *sink; void bar() { int a[100]{1,2,3,4}; sink =...

View Article
Browsing all 21994 articles
Browse latest View live


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