Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
tadd committed Oct 28, 2024
1 parent e768734 commit 7f5799d
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,22 @@ printf("new length: %zu\n", scary_length(a)); //=> 2
You can push elements with automatic memory extension,
as much as you want.

Moreover, the `scary_push` is a _generic_ function, so this code

```c
scary_push(&a, 0UL);
```
produces a warning by default with modern compilers like GCC 12.
<pre><code>warning: passing argument 1 of ‘scary_push_uint64’ from incompatible pointer type [-Wincompatible-pointer-types]
scary_push(&a, 0UL);
^~
|
int **</code></pre>
You can of course opt-in an option `-Werror` to prevent such typing mistakes.
And you'll see **magic** here:
```c
Expand Down

0 comments on commit 7f5799d

Please sign in to comment.