30 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
0
votes
0
answers
92
views
making gcc-10.5.0 while it is paused
I tried to install gcc-10.5.0 from source (without using sudo) based on the information provided in here:
https://gcc.gnu.org/wiki/InstallingGCC
However, after a while, it pauses without any error at ...
1
vote
1
answer
169
views
Bootstrapped GCC is using incorrect search paths
I'm attempting to build GCC 10.5 for an older version of QNX on an x86 platform in an Ubuntu 20.04 x86_64 environment. I downloaded the gcc-10.5.0.tar.xz file from GNU's FTP server and ran the ...
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
51
views
Escape Character's unusal behavior
I'm getting an unintended output from this code.
int main() {
int var;
while ((var = getchar() ) != '\n') {
if (var == '\t')
printf("\\t");
if (var ...
-2
votes
2
answers
454
views
Consistency of undefined behavior for a fixed compiler
I wonder how the compilers deal with undefined behavior.
I will take GCC 10.4 for x86 architecture and -O2 -std=c++03 flags as an example, but please feel free to comment on other compilers.
What does ...
2
votes
2
answers
242
views
Can this incomplete type be improved to work with this C++ concept?
The following code works as designed with g++ 9.3.1 and the old concepts TS. But I haven't gotten it to work with g++ 10.3.1 and the C++ core language version of concepts:
#if __cpp_concepts < ...
1
vote
1
answer
1k
views
gcc 10 support for atomic shared_ptr
I thought g++ 10.3 should have supported the C++20 feature of atomic shared_ptr? But I am still getting the following error
#include <atomic>
#include <thread>
#include <memory>
int ...
0
votes
0
answers
130
views
Compile error, c++ OlcPixelGameEngine header file in use. Ubuntu 20.04
so the header file actually needs packages for it to work, I don't know how to install it that is why I am posting the error here.
-lGL -lpthread -lpng -lstdc++fs -std=c++17
/usr/bin/ld: cannot find -...
5
votes
1
answer
1k
views
Is it possible to mix the 'range-v3' include(s) with the c++ 'ranges' include?
I have access to GCC 10 and compile with -std=c++20, and need views such as generate cache1, concat etc that aren't slated until possibly C++23.
I wrote a simple program below that outputs '1 2 2 3 3 ...
1
vote
2
answers
4k
views
Linux Debian 10 how to use c++ 20
Well unluky as I am i had to a hard drive crash and had to reinstall my Linux. I tried to use vs studio code with C++20 but he does not recognize it. Below is my config.
{
"version": &...
0
votes
0
answers
159
views
warning: compound assignment with 'volatile'-qualified left operand is deprecated [duplicate]
I have some c++ project in my hands, before this problem arrive i have c++17 flag in my makefile after i tried c++20 this warnings shows up.
After a short look i dont understand what is the problem, ...
0
votes
1
answer
1k
views
c++20 concepts constructor overloading
Let
#include<concepts>
struct B{};
template<typename T>
struct A{
A(int) {}
};
template<>
struct A<B>{
A(B d) {}
};
template<typename T>
struct C{
A<T> ...
1
vote
1
answer
409
views
atomic_wait and similar methods in c++ 20 and g++ 10.2
I am compiling with g++ 10.2 using -std=c++20 but i get errors like error: ‘atomic_notify_one’ is not a member of ‘std’. I see in the docs that those methods are supported in c++20. Do i miss ...
1
vote
1
answer
1k
views
Is g++ different than g++ -std=c++14 when the default standard is 201402L (c++14)?
I was trying to make use of precompiled headers to speed up compilation following this link: https://codeforces.com/blog/entry/53909
I observed that pre-compilation of headers and subsequent ...
0
votes
1
answer
179
views
Building MinGW with Mingw-builds fails
I have been building mingw-w64 using mingw-builds (https://github.com/niXman/mingw-builds) successfully for a long time. Now I wanted to build g++ 10.3, but somehow it does not work anymore. I have ...