https://software.codidact.com/categories/38/tags/3466.rssNew Posts Tagged 'gcc' - Software DevelopmentSoftware Development - Codidact2022-11-02T23:03:17Zhttps://software.codidact.com/posts/286575How to write a macro that discards the const qualifier, for any type?alxhttps://software.codidact.com/users/539372022-06-10T14:55:22Z2022-11-02T23:03:17Z<p>How to write a macro that discards the const qualifier, for any type?</p>
<p>I hope some combination of <code>typeof</code> and a cast will do, but haven't found the combination.</p>
<p>I trie...https://software.codidact.com/posts/286627Assert that some code is not present in the final binary, at compile or link time.alxhttps://software.codidact.com/users/539372022-06-23T12:45:14Z2022-06-27T09:24:11Z<p>I'd like to assert that some code can be optimized out, and is not present in the final binary object.</p>
<pre><code class="language-c">#define CONSTANT 0
#if (!CONSTANT)
[[landmine_A]]
...https://software.codidact.com/posts/282670Why does this code that uses a pointer-to-pointer-to-int segfault?M3dc0dhttps://software.codidact.com/users/541762021-07-13T11:45:03Z2021-07-13T16:40:28Z<p>Hello folks, can someone resolve this seg fault with me please, i can't find the error where it occur. Thank you.</p>
<pre><code>#include <stdlib.h>
#include <stdio.h>
int ft_ul...https://software.codidact.com/posts/281464Warn of implicit cast in a function's arguments with GCC?Quasímodohttps://software.codidact.com/users/539192021-04-21T19:34:38Z2021-04-22T15:41:40Z<p>In the C program below, I make a mistake and call the function with <code>(ld, ld)</code> instead of <code>(d, ld)</code>.</p>
<pre><code class="language-c">#include <stdio.h>
#include &...https://software.codidact.com/posts/277575Generate SIGSEGV without undefined behaviour.Estelahttps://software.codidact.com/users/533202020-08-31T09:51:08Z2020-08-31T13:05:22Z<p>In order to test that coredumps are generated and that they contain useful information which can be retreived with gdb I need to generate a SIGSEGV. Or anything else which causes a coredump.</p>...