42,293 questions
-3
votes
2
answers
162
views
I don't understand what they are referring to by deprecated is the global declaration of x is what is deprecated? [duplicate]
english is not my native language i tried using translators but nothing works i am trying to understand this from cppreference
(deprecated) Namespace scope declaration of a static data member that was ...
2
votes
2
answers
140
views
R package ggvoroni (deprecated) needs rgeos (deprecated)
I'm using R version 4.6.0 and want to install the deprecated package ggvoroni which needs the deprecated package rgeos.
When I run
remotes::install_version("rgeos", version = "0.6-4&...
0
votes
0
answers
67
views
Why does alignment increase cause weird behavior?
I have an avx2 implementation of cryptographic hash LSH512-512 with context implementation:
typedef struct st_lsh512_avx2_context {
size_t bidx;
size_t length;
alignas(32) simde__m256i ...
6
votes
2
answers
260
views
Not able to compile code shown on the "The Linux Foundation" YouTube channel
I was watching this video What Is an ABI, and Why Should You Care? by Shung-Hsi Yu, SUSE and in the first few minutes they showed the following code and compiled it as follows:
geo.h:
struct point {
...
Advice
3
votes
12
replies
222
views
Constness of Stop Request
std::stop_source::request_stop is a non-const method according to cppreference. It is a const method, however, on GCC 13 (and possibly other versions, see gcc.gnu.org/onlinedocs). That's why Clang-...
2
votes
0
answers
144
views
How do I compile a C code with unsupported architecture? '_mm512_aesenc_epi128': target specific option mismatch
I've got a problem in which I create a macros for portable AES intrinsics and utilize AVX512 if the target architecture supports it. The snippet:
#if defined __VAES__ // required AVX512-VAES, not used ...
0
votes
1
answer
135
views
Output file after consteval and reflection
I know that I can get the preprocessed file. I also know that I can get the assembly file.
Is there a way to get an intermediate file that is after consteval, reflection, and the like have been ...
Advice
1
vote
2
replies
121
views
Consequences of RTLD_NEXT and RTLD_DEFAULT no longer guarded by _GNU_SOURCE
I was messing with some stuff in C and was surprised to discover that the following:
#include <stdio.h>
#include <dlfcn.h>
int main(void) {
void *handle = dlsym(RTLD_NEXT, &...
3
votes
2
answers
142
views
Can scalars safely alias GCC/Clang vectors?
I have been using Apple SIMD which appears to be implemented using the GCC/Clang vector extensions. Although the C standard forbids most pointer type-punning due to strict aliasing, I am asking about ...
6
votes
1
answer
194
views
Can I make GCC assume pre/post contracts hold on the callee/definition side?
My project makes use of a macro (together with doc comments) to express function pre/post contracts. The macro is intentionally such that if NDEBUG is defined, it expands essentially to [[assume(expr)]...
3
votes
0
answers
106
views
Compiling with reflection causes pthread_mutex_t to have conflicting declaration
I have been trying to use modules and reflection in a personal project. I am compiling using GCC16.1.1. I have encountered a case that is fails to compile. Below are the commands to compile, the ...
Best practices
0
votes
0
replies
34
views
Ninja and parallelization from link time optimization
GCC, when linking LTO objects, will run a bunch of subprocesses in parallel. It uses Make to coordinate that, in the hope that if there is a jobserver present (i.e. gcc itself has been called from ...
4
votes
1
answer
183
views
`template for` is not constexpr when looping over nonstatic data members
I am trying the new C++26 type reflection features in gcc 16.1, and I have this basic code for converting a struct/class to JSON (see at the end).
My code:
#include <meta>
#include <string>...
2
votes
1
answer
204
views
sign-conversion warning when indexing a std::array inside a for loop
To my understanding, since a for loop is used to define runtime control flow, element_declaration (e in the example below) shouldn't be considered a constant expression (even though it copies ...
1
vote
1
answer
94
views
How to ignore unknown warning options in gcc >4.4?
Alledgedly this was the default behaviour for sufficiently old gcc versions.
Unfortunately, gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0 (and according to another comment already gcc 7.3.0) have ...