37 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
0
votes
1
answer
118
views
Possible bug in gcc11 parsing include paths?
With gcc11 (11.3.1) I'm seeing a strange behavior where it seems that -idirafter path takes precedence over -iquote path if path is the same for both options.
Consider:
// test/foo.hpp
#pragma once
...
0
votes
2
answers
494
views
Install g++ 11 on OpenSUSE Tumbleweed
I am trying to install g++ 11 on OpenSUSE Tumbleweed.
By default via Zypper, g++ 13 is installed, but I need g++ 11 for my project.
This is what I am following :
zypper addrepo https://download....
0
votes
0
answers
74
views
Inline == and != operators removed from list iterators in gcc11
My compiler is updating to gcc11, and has started throwing errors for this code that was compiling before:
#include <list>
#include <map>
template < class Key, class T, class Compare = ...
0
votes
1
answer
471
views
Is it possible to use Gcc 11 and G++ 11 in Ubuntu 16.04?
I'm using Ubuntu 16.04, and I just could update my Gcc and G++ compilers up to 9.4.0 version, but I need to use Gcc and G++ 11. How could I do that?
I expect to solve the previous issue about updating ...
0
votes
0
answers
78
views
gcc-11: fatal error: cannot specify ‘-o’ with ‘-c’, ‘-S’ or ‘-E’ with multiple files compilation terminated
When I am trying to run stylegan2 I get the following error:
NotFoundError: /home/chengjun/stylegan2-master/dnnlib/tflib/_cudacache/fused_bias_act_347e82e8919aeb0d5c7dc989e996c091.so: undefined symbol:...
0
votes
0
answers
175
views
Do optimised calls to memcpy@plt respect restrictions on instruction sets?
In c++ I have the following piece of code, that is optimised in assembly to call memcpy.
void do_something(big_struct& a, const big_struct& b)
{
a = b;
}
lea rdi,[rsi+0x4]
mov edx,...
0
votes
1
answer
774
views
Why gcc 12 takes 6 times larger disk space than 11 in a linux distro?
I've recently tried to move from Linux Mint 21 to 21.2. I've downloaded distro and noted 3Gb vs 2.4 Gb size of ISO file. From comparison major single difference is inclusion of GCC 12 along with GCC ...
2
votes
2
answers
2k
views
workaround for dynamic formatting specs with fmt
Is there a way to use fmt with a spec that is computed at runtime.
Noticed that with gcc 10 this code worked fine but not with modern gcc.
#include <fmt/format.h>
const char* get_spec(bool test)...
0
votes
1
answer
335
views
C - const qualifier discard when const void* is actually struct**
Stuck on "cast discards 'const' qualifier"
I have a code:
int cmp_str_and_dirent(const void *key, const void *elem) {
const char *name = key;
const struct dirent *de = *(const struct ...
3
votes
2
answers
464
views
gcc 11 link error only when optimization disabled
I am facing this weird issue with gcc 11.3.0, a -O3 build works, whereas when I build with -O0 -g (debug build), I get linker error:
/usr/bin/ld: path/to/mylib.a(my_file.cpp.2.o): undefined reference ...
Ani's user avatar
- 1,546
1
vote
1
answer
384
views
Upgrading from C++17 to C++20, encountering a build error in Boost, async_accept() when using boost::asio::use_future as second argument
OS: Ubuntu 22.04
Compiler: gcc 11.3
Boost Version: 1.80
Working on upgrading an existing project from C++ standard C++17 to C++20. Everything compiles in C++17 but when upgrading to C++20, an error is ...
1
vote
0
answers
33
views
Which section of the modern compiled code controls the exit of a c program?
So, In the binary files of C program compiled using old gcc versions like 3.3.6 there is a section like .dtors but there is nothing like that in the binary files of C program compiled using new gcc ...
0
votes
1
answer
74
views
UNDERFLOW keyword with gcc on MSYS2
I ran into some really weird problem with the compilation of a very simple code
typedef volatile struct _underflow_test
{
unsigned int OPERATION_MODE;
unsigned int UNDERFLOW;
} ...
6
votes
1
answer
971
views
Many "multiple definition of" errors shows up when compiling TPC-DS tools
I'm trying to compile TPC-DS tools (i..e Tools used to benchmark databases) but I'm seeing the following errors:
$ make
gcc -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DYYDEBUG -DLINUX -g -Wall -o ...
2
votes
2
answers
186
views
std::array:size() as a const in gcc 11
I have this example code
#include <iostream>
#include <array>
#include <bitset>
template <class T, std::size_t N>
class Booth
{
public:
int function(const std::array<...