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

Remove a section from ELF during linking stage

How can I remove a section from ELF during linking stage? Is there any linker option or flag for this? I'm mostly interested on how it can be done with LLVM, but any information about GCC will be...

View Article


Capture output of GCC compiler in VB.Net

I've vb.net form with several textboxes and in the code I've defined a process that starts a GCC (MinGW) compiler. The compiler then compiles a C++ file as shown in the code below.Dim proc As...

View Article


Error compiling with GCC/Clang on Mavericks

Apparently Apple removed gcc with the latest OS and now gcc maps to clang.Anyhow, I installed the latest Command Line Tools (Oct 22nd version), but still get the following error messages when trying to...

View Article

Compiler optimizes out the coroutine value

I have implemented two coroutines that uses the Resumable class:#include <coroutine>#include <future>#include <iostream>class Resumable{public: class promise_type { public: auto...

View Article

how to fix include no such file or directory exists in windows OS

I have been battling with this problem all day. i have read a lot of articles on this issue but no one seems to be talking about windows OS.I am working on an encryption algorithm written in c that has...

View Article


Why doesn't this compile [closed]

#include "base.h"#include <Poco/SharedPtr.h>#include <Poco/AutoPtr.h>#include <vector>using Poco::SharedPtr;using Poco::AutoPtr;namespace kroll{ class Value; class KObject; class...

View Article

Why does GCC handle a const reinterpret_cast different when type alias is...

In the following code:#include <cstddef>class s;void foo(void* buffer) { using s_ptr = s *; const auto b_s = reinterpret_cast<const s_ptr>(buffer); const auto b_s2 =...

View Article

What is the purpose of format specifier "%qd" in `printf()`?

I saw format specifier %qd when browsing github code. Then I checked in GCC compiler, it's working fine.#include <stdio.h>int main(){ long long num = 1; printf("%qd\n", num); return 0;}What is...

View Article


Include path not working for Bluez libraries

Im trying to develop application in C using Bluez library on linux. I cant figure out how to properly passall include paths to compiler so that all libraries I need will be visible.No matter what I try...

View Article


D_FORTIFY_SOURCE=2 option does not work for me

I saw that GCC 4.5 and above versions should support –D_FORTIFY_SOURCE=2 option. But it does not work for me, it has been ignred and it does not report issues when i used.Compiler version used is...

View Article

Specialisation of class with template template parameter working in clang but...

I am trying to make my code, already working on clang, compatible with gcc. I have the following main class:template<typename T, typename...Ts>class OperatorTypeHelper{ public: using...

View Article

gcc turning on -O3 causes bug on 128 bit integer [duplicate]

Two versions of a function that multiplies a unsigned 256 bit integer by constant 977. (for cryptography application) Note __int128_t type is used in the 2nd function.#include <stdint.h>#include...

View Article

Understanding gcc -S output

I did gcc -S on the very complex program below on x86_64:int main() { int x = 3; x = 5; return 0;}And what I got was: .file "main.c" .text.globl main .type main, @functionmain:.LFB0: .cfi_startproc...

View Article


ARM Cortex-M7 GCC Linker error Relocation truncated to fit R_ARM_PREL31 when...

Good day everyone.I have a large project for STM32H747XI and there is many of code files that could not be placed into main FLASH memory region so I'm trying to place it on external QSPI flash. So I...

View Article

Homebrew does not link gcc 5.3 to /usr/local/bin/gcc (OS X 10.11.4 El Capitan)

I just updated my Mac Book Pro to El Capitan (10.11.4) and gcc 5.2 broke, so I installed gcc 5.3.0 using homebrew but the new compiler is not linked to /usr/local/bin/gcc. Instead it's linked to...

View Article


Addressing two unrelated arrays with [base+index*scale] without UB

I'm trying to figure out how to get GCC or Clang to use [base+index*scale] addressing to index two unrelated arrays, like this, to save an add instruction:;; rdi is srcArr, rsi is srcArr - dstArr, rax...

View Article

Problem compiling DOOM source: error: initializer element is not constant...

I'm trying to get the original Doom code compiling.I already fixed some errors but I don't know what this means. I'm not that good at C...Example error (there are more errors, but they're the...

View Article


Image may be NSFW.
Clik here to view.

The gnu GCC compiler has the --target=mc68K does it mean it can target all...

In the GCC manual it is stated that --target options has mc68k does this mean it supports the following processor? Will I be able to make an OS for the specified processor? I have attached the image...

View Article

How To Install GCC On Cygwin

So this C/Python book that I own says to choose gcc, gcc-core and gcc-g++ on the Select Packages window. But I couldn't find any such on the list, so I searched up gcc and selected all these from here,...

View Article

why compiler make two identical code for same template type

For a template defined as:struct sameT{};template <class T>void print(){/*do stuff*/}int main(){ print<sameT>(); print<sameT>();}When I watched the machine code generated by gcc for...

View Article
Browsing all 21994 articles
Browse latest View live


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